Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(angular): support esbuild-based executors/builders in @nx/angular:dev-server #20311

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Nov 17, 2023

  • Rename @nx/angular:webpack-dev-server to @nx/angular:dev-server
    • Add migration
  • Force the underlying @angular-devkit/build-angular:dev-server to use esbuild when the build target executor is @nx/angular:browser-esbuild

Current Behavior

The @nx/angular:webpack-dev-server is a webpack-specific executor that doesn't support the esbuild-based executors/builders.

Expected Behavior

The @nx/angular:webpack-dev-server should be renamed to @nx/angular:dev-server and support the esbuild-based executors/builders.

Related Issue(s)

Fixes #20267
Fixes #20332

@leosvelperez leosvelperez self-assigned this Nov 17, 2023
Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Nov 20, 2023 10:32am

@ArielGueta
Copy link

ArielGueta commented Nov 20, 2023

@leosvelperez thanks for the PR! Two questions:

  • It will support the index transformer?
  • It will allow passing plugins?

@leosvelperez
Copy link
Member Author

  • It will support the index transformer?

Yes.

  • It will allow passing plugins?

Not yet. We'll look into supporting that separately.

Please note the Angular CLI builders only support plugins when consuming the builder programmatically, not when running a target through the CLI. So, with the changes on this PR you'll already have the same functionality the Angular CLI builders have to run your project targets. Later, Nx executors will add on top of that and expose a way to provide plugins in your project target configuration.

@FrozenPandaz FrozenPandaz merged commit 40f8c40 into nrwl:master Nov 23, 2023
6 checks passed
@leosvelperez leosvelperez deleted the angular/dev-server branch November 23, 2023 14:50
@ArielGueta
Copy link

@leosvelperez I get a schema error when using "executor": "@nx/angular:browser-esbuild":

Data path "" must NOT have additional properties(indexFileTransformer).

If I comment the code in the Angular source code it works. How do we solve it without changing the Angular source code?

@ArielGueta
Copy link

ArielGueta commented Nov 28, 2023

One more issue when running nx build production:

NX 'indexFileTransformer' is not found in schema

@ArielGueta
Copy link

I also get warnings:

Project 'ui' contains extension with invalid name ($schema).
Project 'ui' contains extension with invalid name (tags).

Copy link

github-actions bot commented Dec 4, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
6 participants