Example use of Emotion 10 using the Parcel bundler and Babel Typescript.
Brief summary of the necessary configs/workarounds.
- Explicitly install
@babel/core
to ensure Babel 7 (ref). - Ensure
tsconfig.json
uses"jsx": "preserve"
(ref). - Use
babel-plugin-transform-inline-environment-variables
to preventprocess it not defined
error (ref). - Achieve
@emotion/babel-preset-css-prop
functionality by re-creating its config with individual plugins, rather than the preset (ref).