This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
CImage and CAvatar depend on process.browser
, not working with Vite
#434
Labels
Describe the bug
CImage and CAvatar depend on
process.browser
which is causing problems with Vite (usingvite-plugin-vue2
)To Reproduce
Steps to reproduce the behavior:
vite-plugin-vue2
and @chakra-ui/vuesrc
Expected behavior
I expect CImage and CAvatar (and Chakra UI Vue overall) to work in a variety of
Desktop
Additional context
CImage and CAvatar appear to be the only components using
process.browser
:https://github.com/chakra-ui/chakra-ui-vue/search?q=process.browser&type=
I have a workaround for a custom polyfill in my
main.js
:My understanding is that
process.browser
is a webpack-centric approach, whereas window !== 'undefined' is more universal.The text was updated successfully, but these errors were encountered: