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

Delete babel display name plugin, delete explicit deps on babel, use SWC in dev #1769

Merged
merged 2 commits into from
Oct 4, 2023

Conversation

david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Oct 4, 2023

The icon export stuff and Ladle were the other big things using Babel, and they're gone in #1765 and #1768. The display name plugin is useful, but it seems like the React dev tools can tell you the path to a component if you click the view source button (see video). As far as I can tell that's basically what the plugin was doing for us. I've never noticed that before, but it looks like it's been in there since at least 2019. Weird. By getting rid of the plugin, Vite can use esbuild (or SWC if we use the plugin) in dev.

The second commit switches to the SWC-based React plugin. I didn't test too scientifically, but timings shown with the --debug flag on the dev server suggest it might be around twice as fast to rebuild on file changes, and it does feel a bit faster to my eye. It's a small difference in absolute terms, though — both are under half a second.

2023-10-04-react-dev-tools.mp4

@vercel
Copy link

vercel bot commented Oct 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Oct 4, 2023 6:00pm

@david-crespo david-crespo changed the title Delete babel component display name plugin and all explicit deps on babel Delete babel display name plugin, delete explicit deps on babel, use SWC in dev Oct 4, 2023
@david-crespo david-crespo merged commit 84aff1d into main Oct 4, 2023
7 checks passed
@david-crespo david-crespo deleted the bye-babel branch October 4, 2023 18:19
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 4, 2023
oxidecomputer/console@af6536d...0cc1e03

* [0cc1e03a](oxidecomputer/console@0cc1e03a) oxidecomputer/console#1770
* [48aea2f4](oxidecomputer/console@48aea2f4) npm audit fix
* [84aff1de](oxidecomputer/console@84aff1de) oxidecomputer/console#1769
* [c127febd](oxidecomputer/console@c127febd) oxidecomputer/console#1768
* [8c9513c1](oxidecomputer/console@8c9513c1) oxidecomputer/console#1765
* [0314fd72](oxidecomputer/console@0314fd72) oxidecomputer/console#1742
* [8918ffa9](oxidecomputer/console@8918ffa9) skip the other flaky test in safari for now. I'm suffering
* [b357246e](oxidecomputer/console@b357246e) increase playwright total time to 20 minutes
* [4f7d401d](oxidecomputer/console@4f7d401d) be sneakier about PR numbers in commit messages in bump omicron PR
david-crespo added a commit to oxidecomputer/omicron that referenced this pull request Oct 4, 2023
The only functional change should be the form validation one. And one
icon. But there are some tweaks to our build setup that I'd like to make
sure we didn't mess up.

oxidecomputer/console@af6536d...0cc1e03

* [0cc1e03a](oxidecomputer/console@0cc1e03a)
oxidecomputer/console#1770
* [48aea2f4](oxidecomputer/console@48aea2f4)
npm audit fix
* [84aff1de](oxidecomputer/console@84aff1de)
oxidecomputer/console#1769
* [c127febd](oxidecomputer/console@c127febd)
oxidecomputer/console#1768
* [8c9513c1](oxidecomputer/console@8c9513c1)
oxidecomputer/console#1765
* [0314fd72](oxidecomputer/console@0314fd72)
oxidecomputer/console#1742
* [8918ffa9](oxidecomputer/console@8918ffa9)
skip the other flaky test in safari for now. I'm suffering
* [b357246e](oxidecomputer/console@b357246e)
increase playwright total time to 20 minutes
* [4f7d401d](oxidecomputer/console@4f7d401d)
be sneakier about PR numbers in commit messages in bump omicron PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant