Forráskód Böngészése

add karma-sourcemap-loader

Evan You 10 éve
szülő
commit
e6ad4ee594

+ 2 - 2
build/karma.base.config.js

@@ -1,6 +1,6 @@
 var webpackConfig = require('./webpack.test.config')
 delete webpackConfig.entry
-delete webpackConfig.devtool
+webpackConfig.devtool = 'inline-source-map'
 
 // shared config for all unit tests
 module.exports = {
@@ -10,7 +10,7 @@ module.exports = {
     '../test/unit/specs/index.js'
   ],
   preprocessors: {
-    '../test/unit/specs/index.js': ['webpack']
+    '../test/unit/specs/index.js': ['webpack', 'sourcemap']
   },
   webpack: webpackConfig,
   webpackMiddleware: {

+ 1 - 1
build/webpack.dev.config.js

@@ -24,5 +24,5 @@ module.exports = {
       }
     })
   ],
-  devtool: '#source-map'
+  devtool: 'source-map'
 }

+ 1 - 1
build/webpack.test.config.js

@@ -36,5 +36,5 @@ module.exports = {
     contentBase: './test/unit',
     noInfo: true
   },
-  devtool: '#source-map'
+  devtool: 'source-map'
 }

+ 1 - 0
package.json

@@ -66,6 +66,7 @@
     "karma-phantomjs-launcher": "^0.2.1",
     "karma-safari-launcher": "^0.1.1",
     "karma-sauce-launcher": "^0.3.0",
+    "karma-sourcemap-loader": "^0.3.7",
     "karma-webpack": "^1.7.0",
     "object-assign": "^4.0.1",
     "phantomjs": "^1.9.17",