Skip to content

Commit

Permalink
fix: app build returned result
Browse files Browse the repository at this point in the history
  • Loading branch information
ocombe committed Feb 5, 2024
1 parent 3d8b555 commit 40b12bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
9 changes: 0 additions & 9 deletions angular/app-types/angular-app-type/angular-build-result.ts

This file was deleted.

19 changes: 11 additions & 8 deletions angular/app-types/angular-app-type/angular.application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import { AngularPreview } from '@bitdev/angular.dev-services.preview.preview';
import {
AppBuildContext,
AppBuildResult,
AppContext,
Application,
ApplicationInstance,
Expand All @@ -28,7 +29,6 @@ import objectHash from 'object-hash';
import { join } from 'path';
import { readConfigFile, sys } from 'typescript';
import { AngularAppOptions } from './angular-app-options';
import { AngularAppBuildResult } from './angular-build-result';
import { buildApplication } from './application.bundler';
import { serveApplication } from './application.dev-server';
import { expandIncludeExclude, JsonObject } from './utils';
Expand Down Expand Up @@ -103,7 +103,7 @@ export class AngularApp implements Application {
angularServeOptions,
angularBuildOptions,
ngEnvOptions: this.options.ngEnvOptions,
sourceRoot: this.options.sourceRoot,
sourceRoot: this.options.sourceRoot
});

}
Expand Down Expand Up @@ -154,9 +154,9 @@ export class AngularApp implements Application {
// const vite = await loadEsmModule('vite');
// const dotenv = vite.loadEnv(mode, rootDir);
return {
...overrides,
...overrides
// ...dotenv
}
};
}

// TODO: fix return type once bit has a new stable version
Expand Down Expand Up @@ -208,7 +208,7 @@ export class AngularApp implements Application {
};
}

async build(context: AppBuildContext): Promise<AngularAppBuildResult> {
async build(context: AppBuildContext): Promise<AppBuildResult> {
const { capsule } = context;
const depsResolver = context.getAspect<DependencyResolverMain>(DependencyResolverAspect.id);
assert(depsResolver, 'Dependency resolver is not defined');
Expand Down Expand Up @@ -236,8 +236,8 @@ export class AngularApp implements Application {
tempFolder: tempFolder,
entryServer,
envVars: {
'process.env': envVars
}
'process.env': envVars
}
});
} else {
let bundler: Bundler;
Expand All @@ -253,7 +253,10 @@ export class AngularApp implements Application {
await bundler.run();
}
return {
publicDir: outputPath
metadata: {
publicDir: appOptions.ssr ? join(outputPath, 'browser') : outputPath,
ssrPublicDir: appOptions.ssr ? join(outputPath, 'server') : undefined
}
};
}

Expand Down

0 comments on commit 40b12bd

Please sign in to comment.