# react-router-tree-shaking-compare **Repository Path**: mirrors_yyx990803/react-router-tree-shaking-compare ## Basic Information - **Project Name**: react-router-tree-shaking-compare - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-03 - **Last Updated**: 2026-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # react-router-tree-shaking-compare This is a minimal example to compare the tree-shaking behavior of different build tools and bundlers. ## Source code Take `react-router` as the input, which is a pure ESM package and has no side effects. ```js import { BrowserRouter, Routes, Route } from "react-router"; console.log(BrowserRouter, Routes, Route); ``` ## Output size Use the default minimizer and build config of each tool. | Build tool | Minified size | Min+Gzipped size | | ------------- | ------------- | ---------------- | | Rspack | 36.35 kB | 13.26 kB | | Rsbuild | 36.39 kB | 13.29 kB | | webpack | 36.96 kB | 13.37 kB | | Vite | 42.67 kB | 15.67 kB | | Rolldown | 42.74 kB | 15.17 kB | | Rolldown Vite | 43.42 kB | 15.46 kB | | Farm | 43.42 kB | 15.63 kB | | Parcel | 44.62 kB | 16.07 kB | | esbuild | 46.12 kB | 16.63 kB | | Bun | 57.73 kB | 20.8 kB | ## Test locally ```bash # Build with rspack pnpm build:rspack # Build with vite pnpm build:vite # ... ```