12345678910111213141516171819202122232425262728293031323334353637 |
- // 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',
- resolve: {
- alias: {
- 'vue': 'vue/dist/vue.esm.js',
- }
- },
- 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/debug.env')
- })
- ]
- })
- // no need for app entry during tests
- delete webpackConfig.entry
- module.exports = webpackConfig
|