UNPKG

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