-
Notifications
You must be signed in to change notification settings - Fork 373
Expand file tree
/
Copy pathdevelopment.js
More file actions
25 lines (20 loc) · 793 Bytes
/
development.js
File metadata and controls
25 lines (20 loc) · 793 Bytes
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
process.env.NODE_ENV = process.env.NODE_ENV || 'development';
const { devServer, inliningCss } = require('shakapacker');
const rspackConfig = require('./rspackConfig');
const developmentEnvOnly = (clientRspackConfig, _serverRspackConfig) => {
// plugins
if (inliningCss) {
// Note, when this is run, we're building the server and client bundles in separate processes.
// Thus, this plugin is not applied to the server bundle.
// eslint-disable-next-line global-require
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
clientRspackConfig.plugins.push(
new ReactRefreshWebpackPlugin({
overlay: {
sockPort: devServer.port,
},
}),
);
}
};
module.exports = rspackConfig(developmentEnvOnly);