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

[vitejs/plugin-legacy] How to use this plugin in a Vinxi project? #420

Open
ddubrava opened this issue Nov 28, 2024 · 0 comments
Open

[vitejs/plugin-legacy] How to use this plugin in a Vinxi project? #420

ddubrava opened this issue Nov 28, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@ddubrava
Copy link

ddubrava commented Nov 28, 2024

Hi!

Is there any information on how to add the vitejs/plugin-legacy plugin to a project?

I added it to the plugins list in the app.config.ts. It creates polyfills in the dist output and manifest.json. But I don't know how to render index.html during SSR so that all the necessary scripts are included. E.g., in a simple Vite app with this plugin, index.html is generated with a script that checks if it’s a modern browser (__vite_is_modern_browser).

We generate the HTML by reading manifest.inputs[...].assets() and appending them, but this list does not include the scripts related to the polyfills plugin.

@nksaraf nksaraf added the help wanted Extra attention is needed label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants