Closed hanayashiki closed 1 year ago
For both, if you don't use transpiler (Babel/SWC) plugins (at least true for SWC in your case), you are using only esbuild during build time. So I expect to have almost no difference for build time. Are you using the same tsconfig/vite core version in both tests? Maybe this could be a speed regression from Vite core or esbuild.
If everything else is strictly identical that's strange. You can use vite build --profile
. If you're ok with sharing the name of your files, you can send it to me by email.
The main goal of this plugin is to speed up dev performances, the time for the app to load for vite dev
should be noticeably faster
Hi! Do you have more information on this? Do you still noticed a difference on a 3 runs average?
My closed-source application is about 100000 lines of TypeScript, as tokei counts:
My plugin configuration:
When switching to
react-swc@3.1.0-beta.2
, thevite build
commands consumes 40s, compared toreact@3.0.1
in 32s.I'm sorry I am unable to open-source my business application, but could there be any benchmark showing
react-swc
is actually faster thanreact
? There's no doubt thatswc
does faster in transpiling, but the cost of communication between native and javascript could be the bottleneck.I also notice that this plugin sets
esbuild: false
in top-level config, could the fact thatswc
is slower thanesbuild
in transpiling lead to slower build?