kn-cli 1.0.129 → 1.0.130
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 +4 -1
- package/package.json +1 -1
package/build/webpack.config.js
CHANGED
|
@@ -51,6 +51,7 @@ const appVersion= CLI_CONFIG?.version ?? '';
|
|
|
51
51
|
const devServer=CLI_CONFIG?.devServer??{};
|
|
52
52
|
const prject_name = CLI_CONFIG?.name??'';
|
|
53
53
|
const sourceMapLocal = CLI_CONFIG?.sourcemap?.local??false;//是否将soucemap改为本地
|
|
54
|
+
const resolveModules=CLI_CONFIG?.resolve?.modules??[];
|
|
54
55
|
|
|
55
56
|
warn(`=====================env-webpack=========================`);
|
|
56
57
|
warn(`devMode:${devMode}`);
|
|
@@ -523,9 +524,11 @@ const config={
|
|
|
523
524
|
output: output,
|
|
524
525
|
resolve: {
|
|
525
526
|
modules: [
|
|
526
|
-
|
|
527
|
+
...resolveModules,
|
|
528
|
+
// 1. 强制只找当前项目根目录下的 node_modules,不往上爬
|
|
527
529
|
path.resolve(dirname,'node_modules'),
|
|
528
530
|
path.resolve(webpackPath, 'node_modules'),
|
|
531
|
+
// 'node_modules'
|
|
529
532
|
],
|
|
530
533
|
extensions: ['.jsx', '.js', '.json','.mjs'],
|
|
531
534
|
alias: {
|