2023-07-25 23:00:45 +00:00
|
|
|
const webpack = require('webpack')
|
|
|
|
const { merge } = require('webpack-merge')
|
|
|
|
const path = require( 'path' );
|
|
|
|
|
2023-07-31 22:41:22 +00:00
|
|
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
|
|
|
|
2023-07-25 23:00:45 +00:00
|
|
|
const common = require('./webpack.common.js')
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = merge(common, {
|
|
|
|
// Set the mode to development or production
|
|
|
|
mode: 'development',
|
2023-07-26 06:21:06 +00:00
|
|
|
// watch: true,
|
|
|
|
// watchOptions: {
|
|
|
|
// ignored: '**/node_modules/',
|
|
|
|
// },
|
|
|
|
|
|
|
|
devServer: {
|
|
|
|
// watchOptions: {
|
|
|
|
// ignored: '**/node_modules/'
|
|
|
|
// },
|
|
|
|
client: {
|
|
|
|
webSocketURL: 'auto://0.0.0.0:0/ws'
|
|
|
|
},
|
2023-07-31 22:41:22 +00:00
|
|
|
allowedHosts: [
|
|
|
|
'seed.aharoni-lab.com']
|
|
|
|
|
|
|
|
|
2023-07-25 23:00:45 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// Control how source maps are generated
|
|
|
|
devtool: 'inline-source-map',
|
|
|
|
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
// Styles: Inject CSS into the head with source maps
|
|
|
|
{
|
|
|
|
test:/\.(s[ac]ss)$/i,
|
|
|
|
use: [
|
|
|
|
'style-loader',
|
|
|
|
'css-loader',
|
|
|
|
'sass-loader'
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: [
|
|
|
|
'style-loader',
|
|
|
|
'css-loader'
|
|
|
|
]
|
2023-07-31 22:41:22 +00:00
|
|
|
},
|
2023-07-25 23:00:45 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
// Only update what has changed on hot reload
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
2023-07-31 22:41:22 +00:00
|
|
|
new ReactRefreshWebpackPlugin()
|
2023-07-25 23:00:45 +00:00
|
|
|
],
|
|
|
|
})
|