// This is the webpack config used for unit tests.

var utils = require('./utils')
var webpack = require('webpack')
var merge = require('webpack-merge')
var baseConfig = require('./webpack.base.conf')

var webpackConfig = merge(baseConfig, {
  // use inline sourcemap for karma-sourcemap-loader
  module: {
    rules: utils.styleLoaders()
  },
  devtool: '#inline-source-map',
  resolveLoader: {
    alias: {
      // necessary to to make lang="scss" work in test when using vue-loader's ?inject option 
      // see discussion at https://github.com/vuejs/vue-loader/issues/724
      'scss-loader': 'sass-loader'
    }
  },
  plugins: [
    new webpack.DefinePlugin({
      'process.env': require('../config/test.env')
    })
  ]
})

// no need for app entry during tests
delete webpackConfig.entry

module.exports = webpackConfig

@@ -339,16 +339,52 @@
 %0A  %7D,%0A  
+%7B%7B#unless_eq compiler %22typescript%22%7D%7D
 devtool:
@@ -405,16 +405,30 @@
 ce-map',
+%7B%7B/unless_eq%7D%7D
 %0A  resol
@@ -545,17 +545,16 @@
 t option
- 
 %0A      /
@@ -767,16 +767,314 @@
 )%0A    %7D)
+%7B%7B#if_eq compiler %22typescript%22%7D%7D,%0A    // devtool option doesn't output typescript sourcemaps to karma%0A    new webpack.SourceMapDevToolPlugin(%7B%0A      filename: null, // if no value is provided the sourcemap is inlined%0A      test: /%5C.(ts%7Cjs)($%7C%5C?)/i // process .js and .ts files only%0A    %7D)%7B%7B/if_eq%7D%7D
 %0A  %5D%0A%7D)%0A

Fix typescript stacktraces using webpack sourcemaps