Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork212
docs(custom-esbuild): align the HTML transformer signature#1705
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
just-jeb commentedMar 10, 2024
Not sure if it actually closes#1690 - it does align the docs with actual implementation but from what I read there is a request for adding |
arturovt commentedMar 10, 2024
We can align the docs for now and then I’ll think on implementing options as a feature. |
just-jeb commentedMar 10, 2024
Sure thing, just saying that aligning the docs won't close#1690 🙂 |
arturovt commentedMar 10, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
However, how do we include target options as the first parameter when the HTML transformer is called by Angular with only the HTML content? We are not responsible for its invocation with only a single parameter. // angular-clireturnindexHtmlTransformer&&content ?awaitindexHtmlTransformer(content) :content; We can certainly make adjustments on our end, but I'm hesitant to modify the contract exposed by their API. If they didn't include target options for this builder, there might be a specific reason for it. The target options only include In this builder, the target is typically always set to Which means the only property may be used is the I can talk to one of the Angular CLI team members who worked on the application builder to understand the exact reasons for its removal. I'm not sure if they gonna decide to bring it back. |
shisukei commentedMar 10, 2024
@arturovt I'm not sure if this is ideal, but from what I've seen, at the post-bundle time, if there is an index transformation function specified, then this function is called with the index content as a parameter. Considering that the context is available in buildCustomEsbuildApplication (or in executeCustomDevServerBuilder), wouldn't it be acceptable to wrap this in a custom function? For instance, if we take the current code of thisfile, we would replace line 30 with something like this: Not sure, but it seems to be a similar approach with custom-webpack (source code). |
Uh oh!
There was an error while loading.Please reload this page.
Closes#1690