linaria
linaria copied to clipboard
Adding @linaria in a babel presets causing styling issues
Environment
- Linaria version: v4.1.0
- Bundler (+ version): Webpack 5+
- Node.js version: v18+
- OS: macOS v12.2.1
Description
I noticed a few issues with styling whenever I include the @linaria presets in the .babelrc file:
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
// "@linaria"
]
}
Issues:
- Dynamic prop with
styledcomponent tag stopped working - Using a
styledandcsstag template in the same file produces an unexpected result.
Without @linaria included in the presets, the style produces the expected result, but the code has testing issues with jest.
Reproducible Demo
I created a GitHub repo for the code: https://github.com/Ibaslogic/linaria-react-test/tree/main/src