Recently,Parcel2
releasebeta3
Version.
The biggest update of this version is to replace theJS
Compiler, fromBabel
Replace withSWC
, which makes the overall compilation speed 10x times faster than before.
SWC
YesRust
WrittenJS
Compiler, the goal is to replaceBabel
。 His author was born in 1997강동윤, he wroteswc
I am a sophomore.
Parcel tired by speed
In order to work with packing tools, big brotherWebpack
Differentiated competition,Parcel
takeZero configurationAs his selling point (benchmarkingWebpack
Cumbersome configuration)
Among them, advancedES
The syntax will be based on thebrowserslist
Target version degraded to correspondingES5
Syntax.
Nonstandard syntax, similarJSX
、TS
, development environment features, similarReact Fast Refresh
They are all out of the box.
The realization of all this is based onBabel
ofJS compilerUp.
andJS
compareRust
The speed disadvantage at the language level isBabel
No amount of optimization can make up for it.
Thus, there is the replacement mentioned at the beginningJS
compiler.
Parcel
The team said,SWC
thanBabel
20x faster
It is worth pondering that in providingbenchmark
When showing performance,Parcel
Usedesbuild
ofbenchmark
。
esbuild
Use 10 copiesthreeJS
Compare the packaging speed of different packaging tools under the default configuration asbenchmark
Volume of speed
esbuild
Is aGo
WrittenJS
Packaging tool, open source in january2020. His author isFigma
ofCTO
Evan Wallace。
Once open source, there are no fancy new functions, and the hard and hard compilation speed comes up.
Outstanding achievements:
Can seeParecel2
Third from bottom.
And big brotherWebpack5
The reason why there is no reciprocal first is that the reciprocal first isWebpack4
。
EvanLater updatedbenchmark
:
althoughParcel
Its advantages are: minimalism and zero configuration. But being pulled out like this is faster than the speed, the result is still so tragic.
PresumablyParcel
Team members are extremely oppressed.
So, brothers, let’s put aside other things first. Let’s roll up the compilation speed together!
After several months of development, we finally have thebeta3
。 And I have to use youesbuild
ofbenchmark
Run again and find the court!
Dimension reduction attack of JS packaging tool
In fact, inWebpack
Today, which has been developed for many years, can highlightWebpack
Encirclement and packaging tools that occupy a place are all following the line of differentiated competition.
stayGoogle
engineerSurmaPackaging tool evaluation website developed with otherstooling.reportYou can see:
Webpack
It supports the most comprehensive functions. Other mainstream packaging tools have their own emphasis.
The direction of the script should have been:
Webpack
Keep going heHexagon WarriorRoute of
Other packaging tools are well installed and follow the differentiated route.
However,esbuild
The sudden rise of has caused a dimension reduction blow to these tools.
Compilation speedIt is really just needed at the time of development.
Parcel
It is not the first and by no means the last tool for change.
Smart vite
Some people embrace change, others are forced to accept it.
Vite
Then say: Volumebundle
Speed? Then I will adoptNo-Bundle
The plan is not up to you.
Compilation speedIs it important to you? Welcome to leave your discussion.