mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-03-29 22:38:26 +08:00
Output CSS sourcemaps in separate file (#5131)
* Output CSS sourcemaps in separate file * explain options
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user