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
I know the react template is not a priority and it's probably specific to react but just in case.
I'm trying this out with typescript and the react template and was setting up styled-components and I got this error in the console of chrome.
Uncaught SyntaxError: The requested module '/@modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js' does not provide an export named 'default'
Vite by default expects all dependencies to ship ES modules, in this case, the dependency in question is using cjs syntax.
What you can do for now is use Snowpack (1.x) alongside Vite - yarn add -D snowpack then run a script of snowpack install to pre-bundle styled-components into a single ESM file. Vite will provide built-in support for this soon.
@nc this issue is way out of date. Your issue is likely completely different, so please open new ones with proper reproduction instead of commenting on old ones.
vitejs
locked as resolved and limited conversation to collaborators
Feb 2, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe the bug
I know the react template is not a priority and it's probably specific to react but just in case.
I'm trying this out with typescript and the react template and was setting up
styled-components
and I got this error in the console of chrome.Reproduction
repo
yarn
yarn dev
System Info
vite
version: vite v0.14.3The text was updated successfully, but these errors were encountered: