Skip to content

Commit

Permalink
Fix GENERATE_SOURCEMAP env not working for css (facebook#5246)
Browse files Browse the repository at this point in the history
  • Loading branch information
crux153 authored and Timer committed Oct 2, 2018
1 parent ab975bb commit 2de3645
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,16 @@ module.exports = {
new OptimizeCSSAssetsPlugin({
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,
},
map: shouldUseSourceMap
? {
// `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,
}
: false,
},
}),
],
Expand Down

0 comments on commit 2de3645

Please sign in to comment.