Skip to content

Commit db72f30

Browse files
committed
refactor: rename webpack config function and file for clarity
- Renamed webpackConfig.js to generateWebpackConfigs.js to better reflect its purpose - Updated the exported function name from webpackConfig to generateWebpackConfigs - Updated all references in development.js, test.js, and production.js to use the new name - Improved code consistency and maintainability with more descriptive naming
1 parent cdbea2c commit db72f30

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

config/webpack/development.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const { devServer, inliningCss } = require('shakapacker');
55

6-
const webpackConfig = require('./webpackConfig');
6+
const generateWebpackConfigs = require('./generateWebpackConfigs');
77

88
const developmentEnvOnly = (clientWebpackConfig, _serverWebpackConfig) => {
99
// plugins
@@ -19,4 +19,4 @@ const developmentEnvOnly = (clientWebpackConfig, _serverWebpackConfig) => {
1919
}
2020
};
2121

22-
module.exports = webpackConfig(developmentEnvOnly);
22+
module.exports = generateWebpackConfigs(developmentEnvOnly);

config/webpack/webpackConfig.js renamed to config/webpack/generateWebpackConfigs.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const clientWebpackConfig = require('./clientWebpackConfig');
55
const serverWebpackConfig = require('./serverWebpackConfig');
66

7-
const webpackConfig = (envSpecific) => {
7+
const generateWebpackConfigs = (envSpecific) => {
88
const clientConfig = clientWebpackConfig();
99
const serverConfig = serverWebpackConfig();
1010

@@ -34,4 +34,4 @@ const webpackConfig = (envSpecific) => {
3434
return result;
3535
};
3636

37-
module.exports = webpackConfig;
37+
module.exports = generateWebpackConfigs;

config/webpack/production.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// The source code including full typescript support is available at:
22
// https://github.com/shakacode/react_on_rails_demo_ssr_hmr/blob/master/config/webpack/production.js
33

4-
const webpackConfig = require('./webpackConfig');
4+
const generateWebpackConfigs = require('./generateWebpackConfigs');
55

66
const productionEnvOnly = (_clientWebpackConfig, _serverWebpackConfig) => {
77
// place any code here that is for production only
88
};
99

10-
module.exports = webpackConfig(productionEnvOnly);
10+
module.exports = generateWebpackConfigs(productionEnvOnly);

config/webpack/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// The source code including full typescript support is available at:
22
// https://github.com/shakacode/react_on_rails_demo_ssr_hmr/blob/master/config/webpack/test.js
33

4-
const webpackConfig = require('./webpackConfig')
4+
const generateWebpackConfigs = require('./generateWebpackConfigs')
55

66
const testOnly = (_clientWebpackConfig, _serverWebpackConfig) => {
77
// place any code here that is for test only
88
}
99

10-
module.exports = webpackConfig(testOnly)
10+
module.exports = generateWebpackConfigs(testOnly)

0 commit comments

Comments
 (0)