Skip to content

Commit ddeb2b2

Browse files
clydinalan-agius4
authored andcommitted
fix(@angular-devkit/build-angular): remove outdated browser-esbuild option 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)
1 parent 0be4038 commit ddeb2b2

File tree

2 files changed

+17
-54
lines changed

2 files changed

+17
-54
lines changed

packages/angular_devkit/build_angular/src/builders/browser-esbuild/builder-status-warnings.ts

-51
This file was deleted.

packages/angular_devkit/build_angular/src/builders/browser-esbuild/index.ts

+17-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import { type ApplicationBuilderOptions, buildApplication } from '@angular/build';
1010
import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect';
1111
import type { Plugin } from 'esbuild';
12-
import { logBuilderStatusWarnings } from './builder-status-warnings';
1312
import type { Schema as BrowserBuilderOptions } from './schema';
1413

1514
export type { BrowserBuilderOptions };
@@ -31,10 +30,25 @@ export async function* buildEsbuildBrowser(
3130
},
3231
plugins?: Plugin[],
3332
): AsyncIterable<BuilderOutput> {
34-
// Inform user of status of builder and options
35-
logBuilderStatusWarnings(userOptions, context);
33+
// Warn about any unsupported options
34+
if (userOptions['vendorChunk']) {
35+
context.logger.warn(
36+
`The 'vendorChunk' option is not used by this builder and will be ignored.`,
37+
);
38+
}
39+
if (userOptions['commonChunk'] === false) {
40+
context.logger.warn(
41+
`The 'commonChunk' option is always enabled by this builder and will be ignored.`,
42+
);
43+
}
44+
if (userOptions['webWorkerTsConfig']) {
45+
context.logger.warn(`The 'webWorkerTsConfig' option is not yet supported by this builder.`);
46+
}
3647

48+
// Convert browser builder options to application builder options
3749
const normalizedOptions = convertBrowserOptions(userOptions);
50+
51+
// Execute the application builder
3852
yield* buildApplication(normalizedOptions, context, { codePlugins: plugins });
3953
}
4054

0 commit comments

Comments
 (0)