Created
October 3, 2017 11:33
-
-
Save branquito/f7dff4315466be97a9de5bd12f6fe384 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the webpack config used for unit tests. | |
var utils = require('./utils') | |
var webpack = require('webpack') | |
var merge = require('webpack-merge') | |
var baseWebpackConfig = require('./webpack.base.conf') | |
var webpackConfig = merge(baseWebpackConfig, { | |
// 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment