UNPKG

1.27 kBJavaScriptView Raw
1const webpack = require('webpack');
2const webpackConfig = require('./webpack.config.js');
3const path = require('path');
4const Clean = require('clean-webpack-plugin');
5
6module.exports = {
7 mode: 'development',
8 cache: true,
9 entry: webpackConfig.entry,
10 output: webpackConfig.output,
11 resolve: webpackConfig.resolve,
12 module: {
13 rules: [
14 {
15 test: /\.js$/,
16 include: path.join(__dirname, 'src'),
17 exclude: /tablefilter\/node_modules/,
18 loader: 'isparta-loader'
19 }
20 ]
21 // TODO: re-instate StringReplacePlugin, currently failing
22 // in conjunction with 'isparta-loader'
23 },
24 devtool: 'source-map',
25 plugins: [
26 new Clean(['dist']),
27 new webpack.LoaderOptionsPlugin({
28 debug: true,
29 options: {
30 isparta: {
31 embedSource: true,
32 noAutoWrap: true,
33 babel: {
34 compact: false,
35 presets: ['env'],
36 plugins: [['transform-es2015-classes', {loose: true}]]
37 }
38 }
39 }
40 })
41 ]
42};