From cb9dec04279f07ab1a978107d3b6295e898e72aa Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 3 Dec 2018 13:38:57 -0800 Subject: [PATCH] Always generate full source map. (#2126) --- Makefile | 6 +++--- package.json | 3 +-- webpack.config.js | 13 ++----------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index b411d9a7c948..3315fb686d34 100644 --- a/Makefile +++ b/Makefile @@ -40,10 +40,10 @@ run: node_modules ## Runs app npm run run & -run-fullmap: node_modules ## Runs the app with the JS mapped to source (good for debugger) - @echo FULL SOURCE MAP Running mattermost Webapp for development FULL SOURCE MAP +run-fullmap: node_modules ## Legacy alias to run + @echo Running mattermost Webapp for development - npm run run-fullmap & + npm run run & stop: ## Stops webpack @echo Stopping changes watching diff --git a/package.json b/package.json index 171f1f332d2e..049e072b912e 100644 --- a/package.json +++ b/package.json @@ -169,8 +169,7 @@ "check": "eslint --ignore-pattern node_modules --ignore-pattern non_npm_dependencies --ignore-pattern dist --ext .js --ext .jsx . --quiet", "fix": "eslint --ignore-pattern node_modules --ignore-pattern non_npm_dependencies --ignore-pattern dist --ext .js --ext .jsx . --quiet --fix", "build": "cross-env NODE_ENV=production webpack --display-error-details --verbose", - "run": "cross-env NODE_ENV=production webpack --progress --watch", - "run-fullmap": "webpack --progress --watch", + "run": "webpack --progress --watch", "test": "jest --forceExit --detectOpenHandles", "stats": "cross-env NODE_ENV=production webpack --profile --json > webpack_stats.json", "updatesnapshot": "jest --updateSnapshot", diff --git a/webpack.config.js b/webpack.config.js index dd2281be5db5..95a247f6154d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,13 +15,9 @@ const WebpackPwaManifest = require('webpack-pwa-manifest'); const NPM_TARGET = process.env.npm_lifecycle_event; //eslint-disable-line no-process-env var DEV = false; -var FULLMAP = false; var TEST = false; -if (NPM_TARGET === 'run' || NPM_TARGET === 'run-fullmap') { +if (NPM_TARGET === 'run') { DEV = true; - if (NPM_TARGET === 'run-fullmap') { - FULLMAP = true; - } } if (NPM_TARGET === 'test') { @@ -32,7 +28,6 @@ if (NPM_TARGET === 'test') { if (NPM_TARGET === 'stats') { DEV = true; TEST = false; - FULLMAP = true; } const STANDARD_EXCLUDE = [ @@ -348,11 +343,7 @@ if (NPM_TARGET !== 'stats') { // Development mode configuration if (DEV) { config.mode = 'development'; - if (FULLMAP) { - config.devtool = 'source-map'; - } else { - config.devtool = 'cheap-module-eval-source-map'; - } + config.devtool = 'source-map'; } // Production mode configuration