-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Support indexFileTransformer in @nx/angular:browser-esbuild executor #20477
Comments
Thanks for reporting this! The That said, we can add support for it similar to how we added it to the |
I haven't been able to reproduce this. Could you provide a repo so I can reproduce it and troubleshoot it? |
I correct myself. The This blocks us from adding support for it to the |
I see that you removed the comments where you said that it will be supported. The weird thing is that when I comment the Angular schema protection it does work. I put a log in the transformer file and I see it. |
Sorry, I'm unsure what you refer to. I didn't remove any comments. I only corrected myself saying we can't support it if the underlying Angular CLI builder doesn't allow to provide it.
Are you referring the |
Sorry, my bad! See here #20311 (comment) |
So you're saying that only the dev-server supports it? If we can't use it also for the build it's pretty redundant for the dev server. |
Oh, that comment. I wrongly didn't check that the Anyways, answering the question more accurately, the I already pinged the Angular team on this. I'm unsure whether the idea is to use esbuild plugins for that or if they'll continue supporting a specific index.html tranformer function. I'm working on adding support for esbuild plugins, and that should allow you to transform your index.html contents if the transformer is not available. |
BTW, I was able to reproduce the warnings you mentioned. That'll be fixed by #20499. |
To make this issue easier to find, and it appears to be specifically about the This is something I'm watching for my own team's use-case as well. |
Quick update: Support for ESBuild plugins is being added in #20504. In the absence of a specific I'm still waiting on feedback from the Angular team on this matter. If it takes too long or it doesn't move forward, we could look into supporting it ourselves by passing it along to the underlying Angular CLI builder as a plugin we create on the fly that executes the developer-provided transformation function. |
FYI: this is coming in Angular 17.1.0: angular/angular-cli@66edac4. Once it's released and we release the support for that Angular version (we're already working on it), you'll be able to use it. |
This was added in #21026 and released in Nx 17.3.0. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
After updating to beta version and started using the @nx/angular:browser-esbuild I have the following issues:
Data path "" must NOT have additional properties(indexFileTransformer).
Error: NX 'indexFileTransformer' is not found in schema
Project 'ui' contains extension with invalid name ($schema).
Project 'ui' contains extension with invalid name (tags).__
Expected Behavior
It should work without errors
GitHub Repo
No response
Steps to Reproduce
Update to latest beta version and use the
@nx/angular:browser-esbuild
executor withindexFileTransformer
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: