提交 31af0fba 编写于 作者: M Mike Greiling

improve sourcemap generation

上级 970155a3
......@@ -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' },
......
......@@ -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({
......
......@@ -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"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册