Replies: 2 comments
-
We are currently re-evaluating if we should even continue to offer our current webpack plugin as it in need of a major overhaul to be reliable. Today, PostCSS is the most reliable way to set up StyleX. |
Beta Was this translation helpful? Give feedback.
-
I resolved the issue. While it may be my own oversight, I was unable to get Webpack 5 to compile the design-system ESM code in a way that could be parsed by Ultimately, I opted to use TypeScript alongside I noticed in another thread that you recommended avoiding bundlers for design-system code. However, in my case, I wanted to author the code in TypeScript to ensure a good developer experience for TypeScript users while still making it accessible to those who are not using TypeScript. To help others who may encounter similar challenges, I created a repo that demonstrates my solution. It’s publicly available here: https://github.com/narehart/stylex-monorepo. |
Beta Was this translation helpful? Give feedback.
-
I'm setting up a monorepo that has packages for a design system with components and tokens. This is built using the following webpack config:
Its then consumed by a web app using the follwing webpack config:
I'm getting a compilation error that
stylex-demo/packages/design-system/dist/index.js: stylex is not a function
. I believe its because the plugin is not compiling the esm module. Is there a way to configure it to do so? Having an example of using@stylexjs/open-props
instylex/apps/webpack-example
would be really helpful.Beta Was this translation helpful? Give feedback.
All reactions