Not compactible in browser
antfu opened this issue · comments
Anthony Fu commented
Environment
Browser
Reproduction
https://stackblitz.com/edit/vitejs-vite-fyufym?file=main.js&terminal=dev
Describe the bug
Pathe is referencing process
and becomes not isomorphic
Line 84 in 77c0ed1
Additional context
No response
Logs
No response
Daniel Roe commented
I think we could resolve this with a node export condition and a slight tweak to the build step.
Pooya Parsa commented
A simple typeof check should be also do the trick :)
Anthony Fu commented
A simple typeof check should be also do the trick :)
I am happy to do that, but what should we use on non-node env? /
or ''
?
Pooya Parsa commented
I think / would be safer for root
Pooya Parsa commented
fixed in 1.0.1 / 1.1.0