Open tienlx97 opened 4 days ago
Yes. You should add the stylex webpack plugin to the server webpack config as well.
stylex.create
is a dummy function that should be transformed into the static classNames
during the compilation, which then can be consumed by React DOM during the server-side rendering.
@SukkaW both webpack.client and webpack.server right
@SukkaW both webpack.client and webpack.server right
Right. You need to enable stylex plugin for both of them because React DOM on both client and server can only consume static classNames
.
I use webpack ssr to render react. That mean I have to file webpack.server.dev.js and webpack.client.dev.js
Should I add stylex config to webpack.server.dev.js ? This is my webpack.server.dev.js file :