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

create possibility to alter the tags before they get injected #5987

Closed
4 tasks done
riw opened this issue Dec 7, 2021 · 1 comment
Closed
4 tasks done

create possibility to alter the tags before they get injected #5987

riw opened this issue Dec 7, 2021 · 1 comment

Comments

@riw
Copy link

riw commented Dec 7, 2021

Clear and concise description of the problem

I din't find any possibility to alter the tags that get injected into the html file or - better - replace the way they get injected with custom logic. I use a framework that lazy loads js chunks depending on whether the element that uses it gets into the viewport. Therefore the script url has to be written as data attribute on the element. It would be helpful if you could add the possibility to replace the logic for adding the js files to the html.

Suggested solution

pass the tags to the transformIndexHtml hook so that they can be changed or removed (and maybe replaced with custom logic to add the files)

Alternative

add an extra hook before the tags get injected that allows to change them

Additional context

No response

Validations

@bluwy
Copy link
Member

bluwy commented Dec 7, 2021

This sounds very similar to #5851, which I had suggested this idea to solve it too. I think we can keep discussion there so closing this.

@bluwy bluwy closed this as completed Dec 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants