-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(configs): compile JSX and add CJS output #597
Conversation
tech/compile-jsx
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/sumup-oss/circuit-ui/854kgabb3 |
Codecov Report
@@ Coverage Diff @@
## alpha #597 +/- ##
=======================================
Coverage 94.25% 94.25%
=======================================
Files 137 137
Lines 2194 2194
Branches 621 621
=======================================
Hits 2068 2068
Misses 103 103
Partials 23 23 |
tech/compile-jsx tech/compile-jsx
d9b87d0
to
738f90c
Compare
🎉 This PR is included in version 2.0.0-alpha.21 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0-beta.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 2.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Purpose
Tools such as create-react-app and create-next-app include
node_modules
in their transpilation process, however, they only transpile standard JavaScript. Thus, Circuit UI needs to precompile JSX, as it is a non-standard syntax.In addition, not all bundlers support ES module syntax. For those, I've added the CJS output format. Bundlers pick the best format that they support automatically based on the
main
andmodule
entries inpackage.json
. This should make Circuit UI work out of the box in most cases.Approach and changes
jsx
option frompreserve
toreact
Definition of done