Skip to content
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

Merged
merged 2 commits into from
Jun 1, 2020
Merged

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented May 29, 2020

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 and module entries in package.json. This should make Circuit UI work out of the box in most cases.

Approach and changes

  • switch TypeScript's jsx option from preserve to react
  • add CJS output format

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

tech/compile-jsx
@connor-baer connor-baer added the 🛠️ tech Changes to the tech stack or infrastructure label May 29, 2020
@connor-baer connor-baer added this to the v2.0 milestone May 29, 2020
@vercel
Copy link

vercel bot commented May 29, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/sumup-oss/circuit-ui/854kgabb3
✅ Preview: https://circuit-ui-git-tech-compile-jsx.sumup-oss.now.sh

@codecov
Copy link

codecov bot commented May 29, 2020

Codecov Report

Merging #597 into alpha will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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
@connor-baer connor-baer merged commit d0b383a into alpha Jun 1, 2020
@connor-baer connor-baer deleted the tech/compile-jsx branch June 1, 2020 07:23
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2020

🎉 This PR is included in version 2.0.0-alpha.21 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2020

🎉 This PR is included in version 2.0.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ tech Changes to the tech stack or infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants