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
If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.
Describe the bug
A clear and concise description of what the bug is.
When serving or building an app the browser flag in the package.json of indirect dependencies seems not to be used, so that provided polyfills are not used.
E.g. the internal globalThis polyfill of the package engine.io-client, where globalThis.js shall be replaced by globalThis.browser.js:
globalThis.js:1 Uncaught ReferenceError: global is not defined
at globalThis.js:1
at wrapper.js?v=79ef5480:11
at polling-xhr.js:7
at wrapper.js?v=79ef5480:11
at index.js:2
at wrapper.js?v=79ef5480:11
at socket.js:1
at wrapper.js?v=79ef5480:11
at index.js:1
at wrapper.js?v=79ef5480:11
I am quite unsure if this is really in the scope of vite or if it is maybe inside esbuild...
Reproduction
Thise repo can be used the reproduce the behavior. In the README there is some more information.
System Info
vite version: 2.0.0-beta.52
Operating System: Linux bda0852ab5e1 4.19.104-microsoft-standard (Docker in WSL.2 under Windows 10)
Node version: v14.15.4
Package manager yarn and version: 2.4.0
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
When serving or building an app the browser flag in the package.json of indirect dependencies seems not to be used, so that provided polyfills are not used.
E.g. the internal globalThis polyfill of the package engine.io-client, where globalThis.js shall be replaced by globalThis.browser.js:
I am quite unsure if this is really in the scope of vite or if it is maybe inside esbuild...
Reproduction
Thise repo can be used the reproduce the behavior. In the README there is some more information.
System Info
vite
version: 2.0.0-beta.52The text was updated successfully, but these errors were encountered: