diff --git a/packages/cli/src/commands/new/new.ts b/packages/cli/src/commands/new/new.ts index 66c29fea8e..a114771212 100644 --- a/packages/cli/src/commands/new/new.ts +++ b/packages/cli/src/commands/new/new.ts @@ -73,9 +73,11 @@ export default async () => { plugin: template.plugin ?? true, }); - const moduleVar = `${camelCase(options.id)}Module${camelCase( - options.moduleId, - )[0].toUpperCase()}${camelCase(options.moduleId).slice(1)}`; // used in default-backend-module template + const moduleVar = + options.moduleId ?? + `${camelCase(options.id)}Module${camelCase( + options.moduleId, + )[0].toUpperCase()}${camelCase(options.moduleId).slice(1)}`; // used in default-backend-module template const extension = `${upperFirst(camelCase(options.id))}Page`; // used in default-plugin template const pluginVar = `${camelCase(options.id)}Plugin`; // used in default-backend-plugin and default-plugin template