From 1059a0df0f91324e569a66979f7600757b274896 Mon Sep 17 00:00:00 2001 From: Purwa Shrivastava Date: Wed, 12 Feb 2020 13:57:34 +0100 Subject: [PATCH] Removing source maps from production mode. --- webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 44b3f9e..5bd6905 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,11 +4,13 @@ const path = require('path'); const DIST = path.resolve("./dist"); const MODE = process.env.NODE_ENV || 'development'; +const SOURCE_MAP = 'sourec-map'; +const DEVTOOL = (process.env.NODE_ENV === 'development') ? SOURCE_MAP : false; console.log('Webpack mode:', MODE); // eslint-disable-line no-console const config = { - devtool: 'source-map', + devtool: DEVTOOL, entry: [ './src/qlik-heatmap-chart.js' ],