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