linaria
linaria copied to clipboard
esbuild setup throws runtime warning
I've created a CodeSandbox with the esbuild configuration mentioned in the docs, but I still get this warning: 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.
Is there something wrong with this setup?
Thought I ran into the same issue, but after looking at your example I realized that you simply ship code to the browser without removing the linaria function calls first. The esbuild config works, if you run npm run build, but in your case create-react-app is using webpack under the hood which in your example is not configured to handle linaria code.
You're right, this issue is (more or less) a duplicate of #668
Runtime mode is not supported (see #668). If you will use containers setup on CodeSandbox/Stackblitz, it will work like a charm 💎
Example: https://stackblitz.com/edit/stackblitz-starters-tq8mic?file=build.mjs
~/projects/stackblitz-starters-tq8mic 4s
❯ node build.mjs