@modern-js/mwa-generator 3.0.6 → 3.0.8

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 (3) hide show
  1. package/dist/index.js +10955 -8283
  2. package/package.json +14 -13
  3. package/src/index.ts +16 -1
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "3.0.6",
14
+ "version": "3.0.8",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/index.js",
17
17
  "files": [
@@ -20,22 +20,23 @@
20
20
  ],
21
21
  "devDependencies": {
22
22
  "@babel/runtime": "^7.18.0",
23
- "@modern-js/codesmith": "2.0.3",
24
- "@modern-js/codesmith-api-app": "2.0.3",
25
- "@modern-js/codesmith-api-json": "2.0.3",
23
+ "@modern-js/codesmith": "2.0.4",
24
+ "@modern-js/codesmith-api-app": "2.0.4",
25
+ "@modern-js/codesmith-api-json": "2.0.4",
26
26
  "@types/jest": "^27",
27
27
  "@types/node": "^14",
28
28
  "jest": "^27",
29
29
  "typescript": "^4",
30
- "@modern-js/base-generator": "3.0.6",
31
- "@modern-js/entry-generator": "3.0.6",
32
- "@modern-js/generator-utils": "3.0.6",
33
- "@modern-js/packages-generator": "3.0.6",
34
- "@modern-js/plugin-i18n": "2.4.0",
35
- "@modern-js/dependence-generator": "3.0.6",
36
- "@modern-js/generator-common": "3.0.6",
37
- "@scripts/jest-config": "2.4.0",
38
- "@scripts/build": "2.4.0"
30
+ "@modern-js/generator-common": "3.0.8",
31
+ "@modern-js/dependence-generator": "3.0.8",
32
+ "@modern-js/generator-utils": "3.0.8",
33
+ "@modern-js/packages-generator": "3.0.8",
34
+ "@modern-js/plugin-i18n": "2.6.0",
35
+ "@modern-js/rspack-generator": "3.0.8",
36
+ "@modern-js/entry-generator": "3.0.8",
37
+ "@modern-js/base-generator": "3.0.8",
38
+ "@scripts/build": "2.6.0",
39
+ "@scripts/jest-config": "2.6.0"
39
40
  },
40
41
  "sideEffects": false,
41
42
  "publishConfig": {
package/src/index.ts CHANGED
@@ -10,6 +10,8 @@ import {
10
10
  Language,
11
11
  EntryGenerator,
12
12
  PackagesGenerator,
13
+ BuildTools,
14
+ RspackGenerator,
13
15
  } from '@modern-js/generator-common';
14
16
  import {
15
17
  getMWAProjectPath,
@@ -199,7 +201,7 @@ export const handleTemplateFile = async (
199
201
  });
200
202
  }
201
203
 
202
- const { packagesInfo } = context.config;
204
+ const { packagesInfo, buildTools } = context.config;
203
205
  if (packagesInfo && Object.keys(packagesInfo).length > 0) {
204
206
  await appApi.runSubGenerator(
205
207
  getGeneratorPath(PackagesGenerator, context.config.distTag),
@@ -208,6 +210,19 @@ export const handleTemplateFile = async (
208
210
  );
209
211
  }
210
212
 
213
+ if (buildTools === BuildTools.Rspack) {
214
+ await appApi.runSubGenerator(
215
+ getGeneratorPath(RspackGenerator, context.config.distTag),
216
+ undefined,
217
+ {
218
+ ...context.config,
219
+ isNewProject: true,
220
+ isSubGenerator: true,
221
+ modernVersion,
222
+ },
223
+ );
224
+ }
225
+
211
226
  return { projectPath };
212
227
  };
213
228