File tree Expand file tree Collapse file tree
packages/cgb-scripts/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const autoprefixer = require( 'autoprefixer' );
2626const 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.
3232const 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 {
You can’t perform that action at this time.
0 commit comments