React 17 Emotion Build Error
1 min readNov 22, 2020
If you use Emotion in React 17, you might find the following problem:
pragma and pragmaFrag cannot be set when runtime is automatic.
> /** @jsx jsx */
TL;DR;
Do this:
/** @jsxRuntime classic */
/** @jsx jsx */
When will it be fixed
Shortly after the upcoming release of TypeScript 4.1
Why this happens
The detail of this problem can be found in the following issues: