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

Support Vite's transformIndexHtml hook #19853

Closed
2 of 4 tasks
TechAkayy opened this issue Mar 22, 2023 · 1 comment
Closed
2 of 4 tasks

Support Vite's transformIndexHtml hook #19853

TechAkayy opened this issue Mar 22, 2023 · 1 comment

Comments

@TechAkayy
Copy link

Describe the feature

There was a PR to support Vite's transformIndexHtml hook by antfu here - nuxt/framework#1711, but it wasn't merged. The reason provided was...

I think it is best if not to support vite specific option if it is already possible with nitro. Please use an issue to describe the usecase we can probably find an alternative :)

But, later the hook "nitro:document" was removed in nitro - https://github.com/unjs/nitro/blob/main/CHANGELOG.md#-breaking-changes-3

Can we bring back the above PR. If not, is there any other way to customize the index.html document? Thank you!

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@TechAkayy
Copy link
Author

Figured it out using addServerPlugin https://nuxt.com/docs/api/advanced/kit#nitro & render:html nitro app hook https://nuxt.com/docs/api/advanced/hooks#nitro-app-hooks-runtime-server-side 👍 Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant