diff --git a/config/karma.config.js b/config/karma.config.js index b317c3f00b236a6989bc6d4eb0de432f86c7f9e3..545390a5a1e08fffd89d17dcb2ef70315c3edf2f 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 4060228c94bd5f560832787c47cf7a1e1b2ea655..f363a9fc4a9f41aa7d5bab6f8e0c0d8df20d0d5d 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 ef16a371f91f71d1a9a78684fcb7011e74126c6e..4ce08487c3da12517b83b2ed287713bd687b41eb 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" } }