Commit 31af0fba authored by Mike Greiling's avatar Mike Greiling

improve sourcemap generation

parent 970155a3
...@@ -12,7 +12,7 @@ module.exports = function(config) { ...@@ -12,7 +12,7 @@ module.exports = function(config) {
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false }, { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false },
], ],
preprocessors: { preprocessors: {
'spec/javascripts/**/*.js?(.es6)': ['webpack'], 'spec/javascripts/**/*.js?(.es6)': ['webpack', 'sourcemap'],
}, },
webpack: webpackConfig, webpack: webpackConfig,
webpackMiddleware: { stats: 'errors-only' }, webpackMiddleware: { stats: 'errors-only' },
......
...@@ -40,7 +40,7 @@ var config = { ...@@ -40,7 +40,7 @@ var config = {
filename: IS_PRODUCTION ? '[name]-[chunkhash].js' : '[name].js' filename: IS_PRODUCTION ? '[name]-[chunkhash].js' : '[name].js'
}, },
devtool: 'source-map', devtool: 'inline-source-map',
module: { module: {
loaders: [ loaders: [
...@@ -93,6 +93,7 @@ var config = { ...@@ -93,6 +93,7 @@ var config = {
} }
if (IS_PRODUCTION) { if (IS_PRODUCTION) {
config.devtool = 'source-map';
config.plugins.push( config.plugins.push(
new webpack.NoErrorsPlugin(), new webpack.NoErrorsPlugin(),
new webpack.optimize.UglifyJsPlugin({ new webpack.optimize.UglifyJsPlugin({
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
"underscore": "1.8.3", "underscore": "1.8.3",
"vue": "2.0.3", "vue": "2.0.3",
"vue-resource": "0.9.3", "vue-resource": "0.9.3",
"webpack": "^1.13.2", "webpack": "^1.14.0",
"webpack-dev-server": "^1.16.2" "webpack-dev-server": "^1.16.2"
}, },
"devDependencies": { "devDependencies": {
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
"jasmine-jquery": "^2.1.1", "jasmine-jquery": "^2.1.1",
"karma": "^1.3.0", "karma": "^1.3.0",
"karma-jasmine": "^1.1.0", "karma-jasmine": "^1.1.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0" "karma-webpack": "^1.8.0"
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment