-
-
Notifications
You must be signed in to change notification settings - Fork 6.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
Expose html transformation API #2270
Comments
The better way is to support html as a result of transform hook (vite should transform html to js itself after that) |
Hello @Djaler is this feature https://vitejs.dev/guide/api-plugin.html#transformindexhtml what you are looking for? |
No. This hook allows me to add additional transformations for the entry point index.html. |
related: #2321 |
Is your feature request related to a problem? Please describe.
I tried to make a plugin to support asciidoctor files. I can easily transform adoc-file to html, but then I need to do a bunch of things over this html string to make all images correctly included into bundle (find all img tags and theirs src, transform them to imports, update src, etc). In webpack this is covered by html-loader. I see that this is also happened in plugin
vite:build-html
Describe the solution you'd like
Maybe you can export API used in this plugin?
Describe alternatives you've considered
Without this the only way I see is too copy a bunch of code from vite or html-loader internals
The text was updated successfully, but these errors were encountered: