2020-05-15 16:16:13 +02:00
|
|
|
/* eslint-env node */
|
|
|
|
|
2019-03-19 18:50:16 +01:00
|
|
|
const { map } = require('ramda')
|
2018-07-12 10:09:41 +02:00
|
|
|
const webpack = require('webpack')
|
2021-01-18 15:02:24 +01:00
|
|
|
const {
|
|
|
|
HTMLPlugins,
|
|
|
|
styleLoader,
|
|
|
|
commonLoaders,
|
|
|
|
default: common,
|
|
|
|
} = require('./webpack.common')
|
2018-07-17 17:36:27 +02:00
|
|
|
|
2018-03-01 19:39:36 +01:00
|
|
|
module.exports = {
|
|
|
|
...common,
|
2021-07-21 23:55:08 +02:00
|
|
|
node: {
|
|
|
|
// This seems necessary to prevent a "Module not found: 'fs'" error when
|
|
|
|
// launching mocha-webpack:
|
|
|
|
fs: 'empty',
|
|
|
|
},
|
2019-03-19 18:50:16 +01:00
|
|
|
module: {
|
2020-11-20 19:47:57 +01:00
|
|
|
rules: [...commonLoaders(), styleLoader('style-loader')],
|
2019-03-19 18:50:16 +01:00
|
|
|
},
|
2021-05-03 17:34:10 +02:00
|
|
|
watchOptions: {
|
|
|
|
aggregateTimeout: 600,
|
|
|
|
},
|
2018-03-01 20:30:57 +01:00
|
|
|
mode: 'development',
|
2021-11-30 16:09:05 +01:00
|
|
|
devtool: 'eval-source-map',
|
2020-11-20 19:47:57 +01:00
|
|
|
entry: map((entry) => ['webpack-hot-middleware/client', entry], common.entry),
|
2018-03-01 19:39:36 +01:00
|
|
|
plugins: [
|
2018-07-04 19:45:43 +02:00
|
|
|
...common.plugins,
|
2019-07-08 11:13:51 +02:00
|
|
|
...HTMLPlugins(),
|
2021-02-11 19:46:51 +01:00
|
|
|
new webpack.EnvironmentPlugin({
|
|
|
|
NODE_ENV: 'development',
|
|
|
|
REDUX_TRACE: false,
|
|
|
|
}),
|
2020-11-20 19:47:57 +01:00
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
],
|
2018-03-01 19:39:36 +01:00
|
|
|
}
|