2020-09-09 08:45:48 +02:00
|
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
|
2020-09-07 15:52:05 +02:00
|
|
|
|
2020-10-27 09:41:16 +01:00
|
|
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
2020-09-09 08:45:48 +02:00
|
|
|
const environment = require('./environment');
|
2020-09-07 15:52:05 +02:00
|
|
|
|
2020-10-27 09:41:16 +01:00
|
|
|
const isWebpackDevServer = process.env.WEBPACK_DEV_SERVER;
|
|
|
|
|
|
|
|
// plugins
|
|
|
|
if (isWebpackDevServer) {
|
|
|
|
environment.plugins.append(
|
|
|
|
'ReactRefreshWebpackPlugin',
|
|
|
|
new ReactRefreshWebpackPlugin({
|
|
|
|
overlay: {
|
|
|
|
sockPort: 3035
|
|
|
|
}
|
|
|
|
})
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2020-09-09 08:45:48 +02:00
|
|
|
module.exports = environment.toWebpackConfig();
|