You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there have a demand that I need to implement dynamic public path in index.html, I want to change all the link/script tags to dynamic tag, because the public path of our resource is configurable, this means that it may be changed in production environment
I found a plugin hook named transformIndexHtml, but all the tags had already been inserted when it was invoked, although I could still implement my demand through a series of logic, but I feel it's not elegant, like patching
Description
there have a demand that I need to implement dynamic public path in
index.html
, I want to change all thelink/script
tags todynamic tag
, because thepublic path
of our resource isconfigurable
, this means that it may be changed in production environmentI found a plugin hook named
transformIndexHtml
, but all the tags had already been inserted when it was invoked, although I could still implement my demand through a series of logic, but I feel it's not elegant, like patchingSuggested solution
Add a plugin hook like
insertTagsToHtml
developer can get the
assetTags
before inserting it into html and finally using returnedhtml
as resultAlternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: