diff --git a/angular/app-types/angular-app-type/angular.application.ts b/angular/app-types/angular-app-type/angular.application.ts index d47ae5f..723b552 100644 --- a/angular/app-types/angular-app-type/angular.application.ts +++ b/angular/app-types/angular-app-type/angular.application.ts @@ -259,9 +259,8 @@ export class AngularApp implements Application { }], metadata: { outputPath, - nitroDir: join(outputPath, 'nitro'), publicDir: join(outputPath, 'browser'), - ssrPublicDir: appOptions.ssr ? join(outputPath, 'server') : undefined + ssrPublicDir: appOptions.ssr ? join(outputPath, 'ssr') : undefined } }; } diff --git a/angular/app-types/angular-app-type/application.bundler.ts b/angular/app-types/angular-app-type/application.bundler.ts index 89f648e..b4da7a3 100644 --- a/angular/app-types/angular-app-type/application.bundler.ts +++ b/angular/app-types/angular-app-type/application.bundler.ts @@ -10,11 +10,11 @@ import { } from '@bitdev/angular.dev-services.common'; import { type ApplicationBuilderOptions, - buildApplicationInternal, type DevServerBuilderOptions + buildApplicationInternal } from '@bitdev/angular.dev-services.ng-compat'; import { Logger } from '@teambit/logger'; import assert from 'assert'; -import { outputFileSync } from 'fs-extra'; +import { outputFileSync, removeSync } from 'fs-extra'; // @ts-ignore import type { NitroConfig } from 'nitropack'; import { basename, extname, join, posix, relative, resolve } from 'path'; @@ -175,7 +175,7 @@ async function getNitroConfig(options: BuildApplicationOptions): Promise { await build(nitro); await nitro.close(); + + // Clean up the temp server folder generated by Angular + const tempDir = normalizePath(join(options.workspaceRoot, options.outputPath, 'server')); + removeSync(tempDir); + logger.end(); }