-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrspack.dev.js
38 lines (35 loc) · 933 Bytes
/
rspack.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const path = require('path');
const ReactRefreshPlugin = require('@rspack/plugin-react-refresh');
const { merge } = require('webpack-merge');
const common = require('./rspack.common.js');
module.exports = merge(common, {
mode: 'development',
devtool: process.env.DEVTOOL ?? 'inline-source-map',
devServer: {
historyApiFallback: process.env.HISTORY_FALLBACK_API ? JSON.parse(process.env.HISTORY_FALLBACK_API) : false,
server: 'http',
port: 8080,
client: {
webSocketURL: process.env.WEB_SOCKET_URL ?? 'http://0.0.0.0:0/client/ws'
},
hot: true,
static: path.join(__dirname, 'resources', 'public')
},
module: {
rules: [{
test: /\.less$/,
type: 'css/auto',
use: [{
loader: 'less-loader',
options: {
lessOptions: {
javascriptEnabled: true
}
}
}]
}]
},
plugins: [
new ReactRefreshPlugin()
]
});