Browse Source

Merge pull request #295 from smiclea/prod-source-map

Use a javascript source map for production builds
Dorin Paslaru 7 years ago
parent
commit
5c9d1ae4c2
1 changed files with 6 additions and 1 deletions
  1. 6 1
      webpack.config.js

+ 6 - 1
webpack.config.js

@@ -109,8 +109,13 @@ const config = createConfig([
       app: sourcePath,
       app: sourcePath,
     }),
     }),
     splitVendor(),
     splitVendor(),
+    () => ({ devtool: 'nosources-source-map' }),
     addPlugins([
     addPlugins([
-      new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false }, mangle: { keep_fnames: true } }),
+      new webpack.optimize.UglifyJsPlugin({
+        compress: { warnings: false },
+        mangle: { keep_fnames: true },
+        sourceMap: true,
+      }),
     ]),
     ]),
   ]),
   ]),
 ])
 ])