Files: 5b2e405d30a0a28a8d6b43dd4ec8b16cdba28cf8 / build / webpack.test.conf.js
830 bytesRaw
1 | // This is the webpack config used for unit tests. |
2 | |
3 | var utils = require('./utils') |
4 | var webpack = require('webpack') |
5 | var merge = require('webpack-merge') |
6 | var baseConfig = require('./webpack.base.conf') |
7 | |
8 | var webpackConfig = merge(baseConfig, { |
9 | // use inline sourcemap for karma-sourcemap-loader |
10 | module: { |
11 | rules: utils.styleLoaders() |
12 | }, |
13 | devtool: '#inline-source-map', |
14 | resolveLoader: { |
15 | alias: { |
16 | // necessary to to make lang="scss" work in test when using vue-loader's ?inject option |
17 | // see discussion at https://github.com/vuejs/vue-loader/issues/724 |
18 | 'scss-loader': 'sass-loader' |
19 | } |
20 | }, |
21 | plugins: [ |
22 | new webpack.DefinePlugin({ |
23 | 'process.env': require('../config/test.env') |
24 | }) |
25 | ] |
26 | }) |
27 | |
28 | // no need for app entry during tests |
29 | delete webpackConfig.entry |
30 | |
31 | module.exports = webpackConfig |
32 |
Built with git-ssb-web