Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rburgst/vite-bundle-size-problem
bug repro repository showing 50% larger bundle sizes with vite 2.6+
https://github.com/rburgst/vite-bundle-size-problem
Last synced: 2 days ago
JSON representation
bug repro repository showing 50% larger bundle sizes with vite 2.6+
- Host: GitHub
- URL: https://github.com/rburgst/vite-bundle-size-problem
- Owner: rburgst
- Created: 2022-05-10T12:49:51.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-10T12:50:19.000Z (over 2 years ago)
- Last Synced: 2024-11-08T17:53:07.101Z (about 2 months ago)
- Language: TypeScript
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Problem showing bundling issues with vite >= 2.6
With `vite 2.5.10`:
```bash
yarn build
yarn run v1.22.18
$ tsc && vite build
vite v2.5.10 building for production...
transforming (1) src/index.tsUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
✓ 11 modules transformed.
dist/vite-bundle-size-problem.es.js 2147.03 KiB / brotli: skipped (large chunk)
dist/vite-bundle-size-problem.umd.js 2147.39 KiB / brotli: skipped (large chunk)
✨ Done in 14.95s.
```With `vite 2.9.8`
```bash
vite v2.9.8 building for production...
transforming (1) src/index.tsUse of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification
✓ 11 modules transformed.
dist/vite-bundle-size-problem.es.js 3211.96 KiB / gzip: 737.04 KiB
```Note that
a) the build does not complete (at least not within 5 minutes or so).
b) the ES output file is now `3211.96 KiB` compared to `2147.03 KiB`## Repro steps
0. run `yarn install`
1. run `yarn build` (by default we use `vite 2.9.8`) note that the build does not terminate and the output file is 3MB
2. change `package.json` and replace ` "vite": "~2.9.8"` with ` "vite": "~2.5.10"`
3. run `yarn install && yarn build` and observe the file size is now only 2 MB