File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,16 @@ module.exports = (env, argv) => {
1414 argv . mode = "development" ;
1515 }
1616
17+ const development = { } ;
18+ if ( argv . mode !== "production" ) {
19+ // This makes the sourcemaps human readable for developers. We use eval-source-map
20+ // because the plain source-map devtool ruins the alignment.
21+ development [ 'devtool' ] = 'eval-source-map' ;
22+ }
23+
1724 return {
25+ ...development ,
26+
1827 entry : {
1928 "bundle" : "./src/vector/index.js" ,
2029 "indexeddb-worker" : "./src/vector/indexeddb-worker.js" ,
@@ -301,10 +310,6 @@ module.exports = (env, argv) => {
301310 chunkFilename : "bundles/[hash]/[name].js" ,
302311 } ,
303312
304- // This makes the sourcemaps human readable for developers. We use eval-source-map
305- // because the plain source-map devtool ruins the alignment.
306- devtool : "eval-source-map" ,
307-
308313 // configuration for the webpack-dev-server
309314 devServer : {
310315 // serve unwebpacked assets from webapp.
You can’t perform that action at this time.
0 commit comments