Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): issue dev-server support warning …
Browse files Browse the repository at this point in the history
…when using esbuild builder

The dev-server builder currently does not support the experimental esbuild-based browser application
builder and will use the Webpack-based builder instead. To better inform users of this behavior, a
warning is now issued upon executing the dev-server.

(cherry picked from commit 0fcc603)
  • Loading branch information
clydin authored and dgp1130 committed Oct 26, 2022
1 parent 91b5bcb commit bebed9d
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,16 @@ export function serveWebpackBrowser(
const cacheOptions = normalizeCacheOptions(metadata, context.workspaceRoot);

const browserName = await context.getBuilderNameForTarget(browserTarget);

// Issue a warning that the dev-server does not currently support the experimental esbuild-
// based builder and will use Webpack.
if (browserName === '@angular-devkit/build-angular:browser-esbuild') {
logger.warn(
'WARNING: The experimental esbuild-based builder is not currently supported ' +
'by the dev-server. The stable Webpack-based builder will be used instead.',
);
}

const browserOptions = (await context.validateOptions(
{
...rawBrowserOptions,
Expand Down

0 comments on commit bebed9d

Please sign in to comment.