Can not make linaria work in Nx+Next #1351
Labels
bug report 🦗
Issue is probably a bug, but it needs to be checked
bundler: webpack 📦
Issue is related to webpack bundler
cat: monorepo 🔱
Issues related to usage of linaria in monorepo
needs: complete repro 🖥️
Issue need to have complete repro provided
platform: next.js 🛠️
Issue related to next.js
Environment
Description
I'm trying to migrate from styled-components to linaria but can not make it work.
my code base is a monorepo with NX, and I use NextJS 12 and React 17.
I have added next-linaria, it will work if all related code is in same app.
but when I import component from libs, it throws error:
Error: Using the "styled" tag in runtime is not supported. Make sure you have set up the Babel plugin correctly. See https://github.com/callstack/linaria#setup
my next configuration file is like:
and I have added below section to package.json to app directory and lib directory.
Reproducible Demo
I have essential code extracted to this repo:
https://github.com/gedaaaa/linaria-demo
The text was updated successfully, but these errors were encountered: