-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Error with indexHtmlTransformer using @nx/angular:application executor #21643
Comments
Thanks for reporting this! Could you please provide a reproduction? I tried reproducing it with a new workspace, and it works correctly, so there might be something specific in your repo (maybe different TS settings) that could be causing the issue. |
@leosvelperez i think the cause is same like this issue #21639 , because i am also getting that error if i am using any imports inside transformer function file
My
|
@leosvelperez repro here run build with |
Thanks for the repro. I'll take a look.
That's a different issue and sort of a limitation due to when we unregister the TS transpiler. The transpiler is unregistered once we've loaded the file being transpiled. If the file (or any transitively imported file) contains code that will be executed later and that code imports another file, the transpiler won't be registered at that point in time. So currently, only top-level imports are correctly processed. |
@leosvelperez ok i understand , in the repro, this file |
So, at least in the provided reproduction, it's an issue with the recently released Could you confirm that downgrading the |
@leosvelperez yeah i can confirm downgrading package |
Awesome. I'll keep this open for now because I'm still looking into whether it's something we can workaround or take care of on our side or if it's plainly a bug from that new version. |
@leosvelperez something related to this change in new version possibly swc-project/swc-node#727 ? |
I got to the bottom of it, and it's an issue on our side that got uncovered by this fix swc-project/swc-node@2f0199b (the change was made some time ago, but it was only released in 1.8.0). So, I'll push a fix for that. |
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
Following documentation about using
indexHtmlTransformer
option with@nx/angular:application
executor here i am receiving this error:Expected Behavior
indexHtmlTranformer
option works as expectedGitHub Repo
Repro
Steps to Reproduce
indexHtmlTransformer
option toproject.json
targetNx 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: