diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-06-21 15:38:04 +0000 |
---|---|---|
committer | Clement Ho <clemmakesapps@gmail.com> | 2018-06-21 15:38:04 +0000 |
commit | fdb74985ee53bef4c18364d209e93978d279e4ae (patch) | |
tree | 9f39bddafed227c6967aa0175d395454db1092c5 /config/webpack.config.js | |
parent | 10d268d57a8fd0ad928dd339d8f5d69db631897e (diff) | |
download | gitlab-ce-fdb74985ee53bef4c18364d209e93978d279e4ae.tar.gz |
Allow omnibus to disable sourcemaps in memory constrained environments
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r-- | config/webpack.config.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js index b1e378f6c27..79b0df76205 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -16,10 +16,13 @@ const DEV_SERVER_PORT = parseInt(process.env.DEV_SERVER_PORT, 10) || 3808; const DEV_SERVER_LIVERELOAD = IS_DEV_SERVER && process.env.DEV_SERVER_LIVERELOAD !== 'false'; const WEBPACK_REPORT = process.env.WEBPACK_REPORT; const NO_COMPRESSION = process.env.NO_COMPRESSION; +const NO_SOURCEMAPS = process.env.NO_SOURCEMAPS; const VUE_VERSION = require('vue/package.json').version; const VUE_LOADER_VERSION = require('vue-loader/package.json').version; +const devtool = IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map'; + let autoEntriesCount = 0; let watchAutoEntries = []; const defaultEntries = ['./main']; @@ -286,7 +289,7 @@ module.exports = { inline: DEV_SERVER_LIVERELOAD, }, - devtool: IS_PRODUCTION ? 'source-map' : 'cheap-module-eval-source-map', + devtool: NO_SOURCEMAPS ? false : devtool, // sqljs requires fs node: { fs: 'empty' }, |