Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): remove outdated browser-esbuild o…
Browse files Browse the repository at this point in the history
…ption warning

The `resourcesOutputPath` option from the browser builder is supported as of 18.2.
The unsupported warning is now removed. The warning logic has also been consolidated
now that there are only several warnings left.

(cherry picked from commit 0b161bc)
  • Loading branch information
clydin authored and alan-agius4 committed Aug 20, 2024
1 parent 0be4038 commit ddeb2b2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 54 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import { type ApplicationBuilderOptions, buildApplication } from '@angular/build';
import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect';
import type { Plugin } from 'esbuild';
import { logBuilderStatusWarnings } from './builder-status-warnings';
import type { Schema as BrowserBuilderOptions } from './schema';

export type { BrowserBuilderOptions };
Expand All @@ -31,10 +30,25 @@ export async function* buildEsbuildBrowser(
},
plugins?: Plugin[],
): AsyncIterable<BuilderOutput> {
// Inform user of status of builder and options
logBuilderStatusWarnings(userOptions, context);
// Warn about any unsupported options
if (userOptions['vendorChunk']) {
context.logger.warn(
`The 'vendorChunk' option is not used by this builder and will be ignored.`,
);
}
if (userOptions['commonChunk'] === false) {
context.logger.warn(
`The 'commonChunk' option is always enabled by this builder and will be ignored.`,
);
}
if (userOptions['webWorkerTsConfig']) {
context.logger.warn(`The 'webWorkerTsConfig' option is not yet supported by this builder.`);
}

// Convert browser builder options to application builder options
const normalizedOptions = convertBrowserOptions(userOptions);

// Execute the application builder
yield* buildApplication(normalizedOptions, context, { codePlugins: plugins });
}

Expand Down

0 comments on commit ddeb2b2

Please sign in to comment.