diff --git a/packages/create-nx-workspace/bin/create-nx-workspace.ts b/packages/create-nx-workspace/bin/create-nx-workspace.ts index 0f3f638b4e3a39..c8940c327c7154 100644 --- a/packages/create-nx-workspace/bin/create-nx-workspace.ts +++ b/packages/create-nx-workspace/bin/create-nx-workspace.ts @@ -335,6 +335,8 @@ async function getConfiguration( preset = Preset.ReactStandalone; } else if (monorepoStyle === 'angular') { preset = Preset.AngularStandalone; + } else if (monorepoStyle === 'node-server') { + preset = Preset.NodeServer; } else { preset = await determinePreset(argv); } @@ -348,17 +350,19 @@ async function getConfiguration( if ( preset === Preset.ReactStandalone || - preset === Preset.AngularStandalone + preset === Preset.AngularStandalone || + preset === Preset.NodeServer ) { appName = argv.appName ?? argv.name ?? (await determineAppName(preset, argv)); name = argv.name ?? appName; - } else { - name = await determineRepoName(argv); - appName = await determineAppName(preset, argv); + if (preset === Preset.NodeServer) { framework = await determineFramework(preset, argv); } + } else { + name = await determineRepoName(argv); + appName = await determineAppName(preset, argv); } style = await determineStyle(preset, argv); } @@ -476,6 +480,11 @@ function determineMonorepoStyle(): Promise { message: 'Standalone Angular app: Nx configures Jest, ESLint and Cypress.', }, + { + name: 'node-server', + message: + 'Standalone Node Server app: Nx configures your framework of choice (e.g. Express) along with esbuild, Eslint and Jest.', + }, ], }, ]) diff --git a/packages/node/src/generators/application/application.ts b/packages/node/src/generators/application/application.ts index 10d7872a23c014..18d175f79e238a 100644 --- a/packages/node/src/generators/application/application.ts +++ b/packages/node/src/generators/application/application.ts @@ -298,6 +298,7 @@ function updateTsConfigOptions(tree: Tree, options: NormalizedSchema) { compilerOptions: { ...shared.tsConfigBaseOptions, ...json.compilerOptions, + esModuleInterop: true, }, ...json, extends: undefined,