-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy pathwebpack.test.config.js
44 lines (43 loc) · 1.31 KB
/
webpack.test.config.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
40
41
42
43
44
const webpack = require('webpack');
const webpackConfig = require('./webpack.config.js');
const path = require('path');
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
module.exports = {
mode: 'development',
cache: true,
entry: webpackConfig.entry,
output: webpackConfig.output,
resolve: webpackConfig.resolve,
module: {
rules: [
{
test: /\.js$/,
include: path.join(__dirname, 'src'),
exclude: /tablefilter\/node_modules/,
loader: 'isparta-loader'
}
]
// TODO: re-instate StringReplacePlugin, currently failing
// in conjunction with 'isparta-loader'
},
devtool: 'source-map',
plugins: [
new CleanWebpackPlugin({
cleanOnceBeforeBuildPatterns: [path.join(process.cwd(), 'dist')]
}),
new webpack.LoaderOptionsPlugin({
debug: true,
options: {
isparta: {
embedSource: true,
noAutoWrap: true,
babel: {
compact: false,
presets: ['env'],
plugins: [['transform-es2015-classes', {loose: true}]]
}
}
}
})
]
};