This repository is based on https://github.com/webpack/benchmark
./scripts/bench-all.sh ${platform}
example
./scripts/bench-all.sh linux
If you only want run specific benchmark in some case, make sure you export BENCHMARK_PLATFORM
variable
example
export BENCHMARK_PLATFORM=mac
A combination of atlaskit-editor
, common-libs
, common-libs-chunks
, rome
Basic react application with @atlaskit/editor-core
A combination of some widely used libraries in Javascript ecosystem.
Same as common-libs
, but using async import()
syntax to force bundler generate multiple chunks.
1000 react components (each component have 200 line of code) to simulate real application in development mode and production mode.
10000 react components (each component only have basic skeleton, complicated application rerender time may greater than hmr time) to test hot module replacement performance of each devServer of bundler.
Using swc loader and swc minifier that could maximize performance of each bundler which is same as in rspack
internally.
webpack
module.exports = {
optimization: {
+ minimizer: [
+ new TerserPlugin({
+ minify: TerserPlugin.swcMinify,
+ // `terserOptions` options will be passed to `swc` (`@swc/core`)
+ // Link to options - https://swc.rs/docs/config-js-minify
+ terserOptions: {},
+ }),
+ ],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /(node_modules|bower_components)/,
use: {
- loader: "ts-loader",
+ loader: "swc-loader",
+ options: {
+ jsc: {
+ parser: {
+ syntax: "typescript",
+ },
+ },
+ },
},
},
],
},
};
parcel
+{
+ "extends": "@parcel/config-default",
+ "optimizers": { "*.js": ["@parcel/optimizer-swc"] }
+}
We have't replace the transformer because parcel has used swc internally to speed up them transformation
Thanks to: @sokra for the great work on the webpack/benchmark project.