-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
Support @vitejs/plugin-legacy
#309
Comments
Should be solved by: vitejs/vite#4122 ref: vitejs/vite#3636 |
This is unfortunately not fully resolved by the above as I thought it might be. Doing a build of the docs with the Legacy plugin included now results in:
|
legacy-plugin
errors when used with VitePress@vitejs/plugin-legacy
When will it be settled |
If anyone is trying to fix this, here is the cause: https://github.com/vuejs/vitepress/blob/baf8083e668ce50a9d26d9398609e196237ebc95/src/node/build/bundle.ts. Currently we assume build output to be of type |
Can I add a judgment on arrays |
Okay so this is a bit more complex than that. Even if we handle that multiple targets (array thing), we still would need a lot of refactoring. There are a bunch of places where we are manually emitting assets having exports, and script tags with type module. These all won't work in older browsers. It would be a bit hard to do that. In the meantime you can use build.target + polyfill.io to slightly improve coverage. |
I'm attempting to use VitePress with the Vite plugin
legacy-plugin
, but on build I receive this error:Here's my
vite.config.js
:Seems like building a legacy bundle for documentation would be a desirable thing, so that the broadest possible clients can read them?
The text was updated successfully, but these errors were encountered: