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
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Provide a description in this issue that describes the bug.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
When using lazy imports with e.g.
vue-router
and the component includes Prism, at production an error is thrown:Prism is not defined
With
vite dev
everything is working fine.Vite Land: https://discord.com/channels/804011606160703521/814182556068085760/824219218617827359
Reproduction
https://github.com/Shinigami92/vite-repro-prism-is-not-defined
Workaround: https://github.com/Shinigami92/vite-repro-prism-is-not-defined/compare/workaround-1
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: yarn
Logs
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: