From 1e86281b81732a5e58d2b8d628634214137689ea Mon Sep 17 00:00:00 2001 From: Eugene Kuzmenko Date: Sat, 11 Feb 2017 18:13:13 +0100 Subject: [PATCH] [fixed] use cheaper `"eval-source-map"` in development mode when constructing a webpack compiler for faster rebuilds --- src/webpack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack.js b/src/webpack.js index 00336f1..798df11 100644 --- a/src/webpack.js +++ b/src/webpack.js @@ -136,7 +136,7 @@ export function getConfig(react: boolean): Object { export function getCompiler(inPath: string, outPath: string): Object { const compiler = webpack({ ...getConfig(false), - devtool: 'source-map', + devtool: isProduction ? 'source-map' : 'eval-source-map', entry: ['babel-polyfill', inPath], output: {path: dirname(outPath), filename: basename(outPath), publicPath: '/'}, plugins: isProduction ? productionPlugins : []