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.
@@ -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
- 'node_modules',
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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kn-cli",
3
- "version": "1.0.129",
3
+ "version": "1.0.130",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {