forked from CoEDL/nabu-collection-viewer-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.test.js
39 lines (36 loc) · 940 Bytes
/
webpack.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
'use strict';
const webpack = require('webpack');
const merge = require('webpack-merge');
const common = require('./webpack.common.js');
const WebpackShellPlugin = require('webpack-shell-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = merge(common, {
devtool: 'eval-source-map',
mode: 'development',
plugins: [
new CleanWebpackPlugin(['dist/'], {watch: true}),
new WebpackShellPlugin({
onBuildExit: ['./node_modules/karma/bin/karma start karma.conf.js'],
safe: true
})
],
module: {
rules: [
{
test: /\.js$/,
use: [
{
loader: 'ifdef-loader',
options: {
DEPLOY_TESTING: false,
DEPLOY_PRODUCTION: false
}
},
{loader: 'babel-loader?presets[]=es2015'}
],
exclude: /node_modules|bower_components/
}
]
},
watch: true
});