Skip to content

Commit

Permalink
Output CSS sourcemaps in separate file (facebook#5131)
Browse files Browse the repository at this point in the history
* Output CSS sourcemaps in separate file

* explain options
  • Loading branch information
Timer authored Sep 27, 2018
1 parent a8fdecd commit 59b51e0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 59b51e0

Please sign in to comment.