Skip to content

Commit 3b74157

Browse files
committed
🐛 FIX: shouldUseSourceMap with env file
1 parent 39c83b4 commit 3b74157

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/cgb-scripts/config/webpack.config.prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const autoprefixer = require( 'autoprefixer' );
2626
const ExtractTextPlugin = require( 'extract-text-webpack-plugin' );
2727

2828
// Source maps are resource heavy and can cause out of memory issue for large source files.
29-
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
29+
const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP === 'true';
3030

3131
// Extract style.css for both editor and frontend styles.
3232
const blocksCSSPlugin = new ExtractTextPlugin( {
@@ -85,7 +85,7 @@ module.exports = {
8585
filename: '[name].js', // [name] = './dist/blocks.build' as defined above.
8686
},
8787
// You may want 'eval' instead if you prefer to see the compiled output in DevTools.
88-
devtool: 'cheap-eval-source-map',
88+
devtool: shouldUseSourceMap ? 'source-map' : false,
8989
module: {
9090
rules: [
9191
{

0 commit comments

Comments
 (0)