create-module-federation 0.0.0-next-20250306071320 → 0.0.0-next-20250306073231
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 +3 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -319,6 +319,7 @@ async function create({ name, templates }) {
|
|
|
319
319
|
}));
|
|
320
320
|
if ('no' === option) cancelAndExit();
|
|
321
321
|
}
|
|
322
|
+
argv.template = templates.includes(argv.template || '') ? argv.template : void 0;
|
|
322
323
|
const projectType = await getProjectType(argv.template);
|
|
323
324
|
if ("other" === projectType) {
|
|
324
325
|
const otherOptions = Object.keys(OTHER_TYPE).map((key)=>({
|
|
@@ -331,7 +332,8 @@ async function create({ name, templates }) {
|
|
|
331
332
|
}));
|
|
332
333
|
const { command } = OTHER_TYPE[otherProjectKey];
|
|
333
334
|
const commandWithManager = command.replace(/^npm create /, `${pkgManager} create `);
|
|
334
|
-
const
|
|
335
|
+
const npmParams = 'npm' === pkgManager && pkgInfo?.version && parseInt(pkgInfo.version.split('.')[0], 10) < 7 ? ' --' : '';
|
|
336
|
+
const realCommand = `${commandWithManager}${npmParams} -d ${distFolder} -n ${mfName}${argv.override ? ' --override' : ''}`;
|
|
335
337
|
const [cmd, ...cmdArgs] = realCommand.split(' ');
|
|
336
338
|
const { status } = (0, __WEBPACK_EXTERNAL_MODULE_child_process__.spawnSync)(cmd, cmdArgs, {
|
|
337
339
|
stdio: 'inherit'
|
package/package.json
CHANGED