2018-03-18 03:31:54 +01:00
|
|
|
const webpack = require('webpack');
|
|
|
|
const webpackConfig = require('./webpack.config.js');
|
|
|
|
const path = require('path');
|
|
|
|
const Clean = require('clean-webpack-plugin');
|
2016-12-04 12:48:57 +01:00
|
|
|
|
|
|
|
module.exports = {
|
2018-02-28 11:53:57 +01:00
|
|
|
mode: 'development',
|
2016-12-04 12:48:57 +01:00
|
|
|
cache: true,
|
2016-12-08 04:21:39 +01:00
|
|
|
entry: webpackConfig.entry,
|
|
|
|
output: webpackConfig.output,
|
|
|
|
resolve: webpackConfig.resolve,
|
2016-12-04 12:48:57 +01:00
|
|
|
module: {
|
2017-01-29 12:50:12 +01:00
|
|
|
rules: [
|
2016-12-04 12:48:57 +01:00
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
include: path.join(__dirname, 'src'),
|
|
|
|
exclude: /tablefilter\/node_modules/,
|
2017-02-03 07:04:07 +01:00
|
|
|
loader: 'isparta-loader'
|
2017-02-04 02:09:20 +01:00
|
|
|
}
|
2016-12-04 12:48:57 +01:00
|
|
|
]
|
2017-02-04 02:09:20 +01:00
|
|
|
// TODO: re-instate StringReplacePlugin, currently failing
|
|
|
|
// in conjunction with 'isparta-loader'
|
2016-12-04 12:48:57 +01:00
|
|
|
},
|
2017-02-03 07:04:07 +01:00
|
|
|
devtool: 'source-map',
|
2017-01-29 12:50:12 +01:00
|
|
|
plugins: [
|
2019-03-27 03:49:35 +01:00
|
|
|
new Clean({
|
|
|
|
cleanOnceBeforeBuildPatterns: [path.join(process.cwd(), 'dist')]
|
|
|
|
}),
|
2017-02-03 07:04:07 +01:00
|
|
|
new webpack.LoaderOptionsPlugin({
|
2017-02-03 13:58:50 +01:00
|
|
|
debug: true,
|
2017-02-03 07:04:07 +01:00
|
|
|
options: {
|
|
|
|
isparta: {
|
|
|
|
embedSource: true,
|
|
|
|
noAutoWrap: true,
|
|
|
|
babel: {
|
|
|
|
compact: false,
|
2018-06-15 13:30:00 +02:00
|
|
|
presets: ['env'],
|
2017-02-03 07:04:07 +01:00
|
|
|
plugins: [['transform-es2015-classes', {loose: true}]]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-02-04 02:09:20 +01:00
|
|
|
})
|
2017-02-03 13:58:50 +01:00
|
|
|
]
|
2016-12-04 12:48:57 +01:00
|
|
|
};
|