Skip to content

Less dependencies and swc compiler#212

Merged
Mortaro merged 4 commits intonullstack:nextfrom
GuiDevloper:less-deps-swc
Apr 27, 2022
Merged

Less dependencies and swc compiler#212
Mortaro merged 4 commits intonullstack:nextfrom
GuiDevloper:less-deps-swc

Conversation

@GuiDevloper
Copy link
Copy Markdown
Member

@GuiDevloper GuiDevloper commented Apr 25, 2022

  • Removing unneeded deps or moving to built-in.
  • Replacing almost all Babel by SWC compiler.

Working example: https://github.com/GuiDevloper/nullstack-tsx-example
Deploys: Vercel | Netlify | Heroku

Bundlephobia comparison:

old new
16.8 MB 8.7 MB

Nullstack Babel/SWC Benchmark

Some tests running and showing good results even at my low-spec dual-core:

CNA Template

Compiler Start Cache Start Build Caching Build Cache Build
Babel 17s 5s 17s 25s 6s
SWC 8s 4s 10s 15s 6s

Docs

Compiler Start Cache Start Build Caching Build Cache Build
Babel 63s 5s 77s 87s 11s
SWC 53s 4s 49s 56s 11s

Some Refs

CRA issue: Consider replacing Babel with SWC

SWC issue: No support for export default from "foo"?

SWC Config

@Mortaro Mortaro merged commit 1f52f71 into nullstack:next Apr 27, 2022
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.

2 participants