From e644f6fc722880d86897a8224f7cafccbe6f0703 Mon Sep 17 00:00:00 2001 From: fent <933490+fent@users.noreply.github.com> Date: Sat, 13 Oct 2018 21:50:39 -0400 Subject: [PATCH] build: set inline source maps on dev --- webpack.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 5d9efe6..6f8dc2d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,6 @@ const path = require('path'); -module.exports = { +module.exports = (env, argv) => ({ entry: { main: './src/js/chrome-options.js', styles: './src/css/chrome-options.css' @@ -9,7 +9,7 @@ module.exports = { filename: '[name].min.js', path: path.resolve(__dirname, './dist') }, - devtool: 'inline-source-map', + devtool: `${argv.mode === 'production' ? '' : 'inline-'}source-map`, module: { rules: [ { @@ -26,4 +26,4 @@ module.exports = { } ] } -}; +});