Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit bea9f10

Browse files
authored
Add source-maps for easier debugging development builds (#1274)
* add source-maps for easier debugging * change test to be a bit more stable
1 parent eae2202 commit bea9f10

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bin/webpack-helpers.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ const getMainConfig = ( options = {} ) => {
153153
return {
154154
entry: getEntryConfig( true, options.exclude || [] ),
155155
output: {
156+
devtoolNamespace: 'wc',
156157
path: path.resolve( __dirname, '../build/' ),
157158
filename: `[name]${ fileSuffix }.js`,
158159
library: [ 'wc', 'blocks', '[name]' ],
@@ -286,6 +287,7 @@ const getFrontConfig = ( options = {} ) => {
286287
return {
287288
entry: getEntryConfig( false, options.exclude || [] ),
288289
output: {
290+
devtoolNamespace: 'wc',
289291
path: path.resolve( __dirname, '../build/' ),
290292
filename: `[name]-frontend${ fileSuffix }.js`,
291293
// This fixes an issue with multiple webpack projects using chunking

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const baseConfig = {
3232
watchOptions: {
3333
ignored: /node_modules/,
3434
},
35+
devtool: NODE_ENV === 'development' ? 'source-map' : false,
3536
};
3637

3738
const CoreConfig = {

0 commit comments

Comments
 (0)