Open lzoia-bc opened 2 years ago
Any news on this topic ?
I have the same issue. I am using react and css imports from ts files. only with no-scope-hoist
it works correctly. otherwise its missing "some" of the CSS.
same here. in local everything is working. TypeScript based NextJS. on production looks like theme provider is not working.
Any updates on this topic ? Since this issue happened to other users, maybe it could be worth give us at least a workaround
π bug report
I have a project with React, Typescrit and Theme-ui for component styling. Following the documentation of the style library the style should work thanks to the New JSX Trasnformation introduced by React v17 which is also supported directly, as the docs say, by parcel. So following the guide i just addes those lines to the tsconfig
If I run parcel in dev mode with the command
parcel src/index.html
the application works fine and all the style is loaded correctly. When I use thebuild
command, instead, the code is generated without cli errors, but the style is not translated correctly. Seems like the JSX transformation is ignored for some reason. So as workaround for the moment I have to add--no-scope-hoist --no-optimize
, that basically doesn't perform any optimization at all to my output code.π Configuration (.babelrc, package.json, cli command)
package.json
tsconfig.json
π€ Expected Behavior
The output code generate by
build
command should have the same behavior as the development codeπ¦ Context
I tried also to use the babel plugins/preset listed the style documentation without any effects
π Your Environment