@modern-js/mwa-generator 3.0.7 → 3.0.9
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/dist/index.js +7842 -6336
- package/package.json +11 -10
- 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.
|
|
14
|
+
"version": "3.0.9",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/index.js",
|
|
17
17
|
"files": [
|
|
@@ -27,15 +27,16 @@
|
|
|
27
27
|
"@types/node": "^14",
|
|
28
28
|
"jest": "^27",
|
|
29
29
|
"typescript": "^4",
|
|
30
|
-
"@modern-js/
|
|
31
|
-
"@modern-js/
|
|
32
|
-
"@modern-js/generator-utils": "3.0.
|
|
33
|
-
"@modern-js/packages-generator": "3.0.
|
|
34
|
-
"@modern-js/
|
|
35
|
-
"@modern-js/
|
|
36
|
-
"@modern-js/generator
|
|
37
|
-
"@
|
|
38
|
-
"@scripts/build": "2.
|
|
30
|
+
"@modern-js/base-generator": "3.0.9",
|
|
31
|
+
"@modern-js/dependence-generator": "3.0.9",
|
|
32
|
+
"@modern-js/generator-utils": "3.0.9",
|
|
33
|
+
"@modern-js/packages-generator": "3.0.9",
|
|
34
|
+
"@modern-js/rspack-generator": "3.0.9",
|
|
35
|
+
"@modern-js/plugin-i18n": "2.7.0",
|
|
36
|
+
"@modern-js/entry-generator": "3.0.9",
|
|
37
|
+
"@modern-js/generator-common": "3.0.9",
|
|
38
|
+
"@scripts/build": "2.7.0",
|
|
39
|
+
"@scripts/jest-config": "2.7.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
|
|