We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab975bb commit 2de3645Copy full SHA for 2de3645
config/webpack.config.prod.js
@@ -171,14 +171,16 @@ module.exports = {
171
new OptimizeCSSAssetsPlugin({
172
cssProcessorOptions: {
173
parser: safePostCssParser,
174
- map: {
175
- // `inline: false` forces the sourcemap to be output into a
176
- // separate file
177
- inline: false,
178
- // `annotation: true` appends the sourceMappingURL to the end of
179
- // the css file, helping the browser find the sourcemap
180
- annotation: true,
181
- },
+ 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,
182
+ }
183
+ : false,
184
},
185
}),
186
],
0 commit comments