@nocobase/devtools 0.7.6-alpha.2 → 0.8.0-alpha.10

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/umiConfig.js +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/devtools",
3
- "version": "0.7.6-alpha.2",
3
+ "version": "0.8.0-alpha.10",
4
4
  "description": "",
5
5
  "license": "Apache-2.0",
6
6
  "licenses": [
@@ -11,7 +11,7 @@
11
11
  ],
12
12
  "main": "./src/index.js",
13
13
  "dependencies": {
14
- "@nocobase/build": "0.7.6-alpha.2",
14
+ "@nocobase/build": "0.8.0-alpha.10",
15
15
  "@testing-library/react": "^12.1.2",
16
16
  "@types/jest": "^26.0.0",
17
17
  "@types/koa": "^2.13.4",
@@ -61,5 +61,5 @@
61
61
  "url": "git+https://github.com/nocobase/nocobase.git",
62
62
  "directory": "packages/core/devtools"
63
63
  },
64
- "gitHead": "2cfccff9d3ff14c521bf317fa7ee4efa18444c92"
64
+ "gitHead": "a9723cdeadc764eba634b5815685177679025c83"
65
65
  }
package/umiConfig.js CHANGED
@@ -65,6 +65,22 @@ function resolveNocobasePackagesAlias(config) {
65
65
  config.resolve.alias.set(`@nocobase/plugin-${package}`, packageSrc);
66
66
  }
67
67
  }
68
+ const samples = fs.readdirSync(resolve(process.cwd(), './packages/samples'));
69
+ for (const package of samples) {
70
+ const packageSrc = resolve(process.cwd(), './packages/samples/', package, 'src');
71
+ if (existsSync(packageSrc)) {
72
+ config.module.rules.get('ts-in-node_modules').include.add(packageSrc);
73
+ config.resolve.alias.set(`@nocobase/plugin-sample-${package}`, packageSrc);
74
+ }
75
+ }
76
+ const pros = fs.readdirSync(resolve(process.cwd(), './packages/pro-plugins'));
77
+ for (const package of pros) {
78
+ const packageSrc = resolve(process.cwd(), './packages/pro-plugins/', package, 'src');
79
+ if (existsSync(packageSrc)) {
80
+ config.module.rules.get('ts-in-node_modules').include.add(packageSrc);
81
+ config.resolve.alias.set(`@nocobase/plugin-pro-${package}`, packageSrc);
82
+ }
83
+ }
68
84
  }
69
85
 
70
86
  exports.getUmiConfig = getUmiConfig;