-
I'm trying to get solid js working with the stylex postcss plugin but am running in to the following error.
I attempted mimic this react example here, but I'm not sure where I'm going wrong. Can anyone help me out? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Unsure but FWIW I use |
Beta Was this translation helpful? Give feedback.
-
@taphill setting I also added the StyleX Babel plugin as an explicit dependency but I don't think that should make a difference since the package is installed either way. Still, it's a good practice to do so since it may not work with |
Beta Was this translation helpful? Give feedback.
@taphill setting
treeshakeCompensation: false
in the babel config seems to solve the problem:https://stackblitz.com/edit/vitejs-vite-ntuc7mbx?file=package.json,babel.config.cjs,src%2Ftokens.stylex.ts,src%2FApp.tsx
I also added the StyleX Babel plugin as an explicit dependency but I don't think that should make a difference since the package is installed either way. Still, it's a good practice to do so since it may not work with
pnpm
orbun
.