diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-01-07 01:36:19 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-10 12:30:44 -0600 |
commit | 31af0fbaf83c5a4e4dbcaabf0819084b13d07233 (patch) | |
tree | 7de0bf18c69e234d7f0075ad15be97271ebc2ee5 | |
parent | 970155a3f47ee90d6bfab8d0b5b63f103b832cbd (diff) | |
download | gitlab-ce-31af0fbaf83c5a4e4dbcaabf0819084b13d07233.tar.gz |
improve sourcemap generation
-rw-r--r-- | config/karma.config.js | 2 | ||||
-rw-r--r-- | config/webpack.config.js | 3 | ||||
-rw-r--r-- | package.json | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/config/karma.config.js b/config/karma.config.js index b317c3f00b2..545390a5a1e 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -12,7 +12,7 @@ module.exports = function(config) { { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false }, ], preprocessors: { - 'spec/javascripts/**/*.js?(.es6)': ['webpack'], + 'spec/javascripts/**/*.js?(.es6)': ['webpack', 'sourcemap'], }, webpack: webpackConfig, webpackMiddleware: { stats: 'errors-only' }, diff --git a/config/webpack.config.js b/config/webpack.config.js index 4060228c94b..f363a9fc4a9 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -40,7 +40,7 @@ var config = { filename: IS_PRODUCTION ? '[name]-[chunkhash].js' : '[name].js' }, - devtool: 'source-map', + devtool: 'inline-source-map', module: { loaders: [ @@ -93,6 +93,7 @@ var config = { } if (IS_PRODUCTION) { + config.devtool = 'source-map'; config.plugins.push( new webpack.NoErrorsPlugin(), new webpack.optimize.UglifyJsPlugin({ diff --git a/package.json b/package.json index ef16a371f91..4ce08487c3d 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "underscore": "1.8.3", "vue": "2.0.3", "vue-resource": "0.9.3", - "webpack": "^1.13.2", + "webpack": "^1.14.0", "webpack-dev-server": "^1.16.2" }, "devDependencies": { @@ -41,6 +41,7 @@ "jasmine-jquery": "^2.1.1", "karma": "^1.3.0", "karma-jasmine": "^1.1.0", + "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^1.8.0" } } |