kn-cli 1.0.102 → 1.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webpack.config.js +8 -6
- package/package.json +1 -1
package/build/webpack.config.js
CHANGED
|
@@ -161,7 +161,7 @@ const LOADER_JS=[
|
|
|
161
161
|
},
|
|
162
162
|
},
|
|
163
163
|
]
|
|
164
|
-
if(
|
|
164
|
+
if(process.env.build_env == 'localdebug'){
|
|
165
165
|
if(devServer?.hot&&devServer?.reactRefresh==true){
|
|
166
166
|
LOADER_JS[0].options.plugins.push(['react-refresh/babel'])//
|
|
167
167
|
}
|
|
@@ -522,11 +522,13 @@ const config={
|
|
|
522
522
|
plugins: plugins,
|
|
523
523
|
};
|
|
524
524
|
|
|
525
|
-
if(
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
525
|
+
if(process.env.build_env == 'localdebug'){
|
|
526
|
+
if(CLI_CONFIG?.cache){
|
|
527
|
+
config.cache = CLI_CONFIG.cache;
|
|
528
|
+
}
|
|
529
|
+
if(devServer?.hot != undefined){
|
|
530
|
+
config.devServer.hot = devServer.hot;
|
|
531
|
+
}
|
|
530
532
|
}
|
|
531
533
|
warn(`=====================webpack config=========================`);
|
|
532
534
|
console.log(config)
|