Output CSS sourcemaps in separate file (#5131)

* Output CSS sourcemaps in separate file

* explain options
This commit is contained in:
Joe Haddad
2018-09-27 09:13:27 -04:00
committed by GitHub
parent d3e56cdc9e
commit fed41009b6

View File

@@ -158,7 +158,17 @@ module.exports = {
sourceMap: shouldUseSourceMap,
}),
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: { parser: safePostCssParser },
cssProcessorOptions: {
parser: safePostCssParser,
map: {
// `inline: false` forces the sourcemap to be output into a
// separate file
inline: false,
// `annotation: true` appends the sourceMappingURL to the end of
// the css file, helping the browser find the sourcemap
annotation: true,
},
},
}),
],
// Automatically split vendor and commons