Vite plugin legacy and detectModernBrowserCode check #11778
htavernier-ogoxe
started this conversation in
General
Replies: 1 comment 1 reply
-
When It seems the try-catch is redundant. I don't find any cases that throws an error. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I every one,
I explore the code of the legacy plugin because I have to copy this behavior for a plugin between vite and symfony. https://github.com/lhapaipai/vite-bundle
I look more particularly at the portion that verifies if the browser supports modern code :
<script type="module">
the code is here :
vite/packages/plugin-legacy/src/index.ts
Line 114 in 697dd00
it looks like this code would set the variable __vite_is_modern_browser to true if the browser doesn't support : import.meta / dynamic import, which does not seem to be the desired behavior.
before opening an issue I would like to have your confirmation
Beta Was this translation helpful? Give feedback.
All reactions