Chunks are too large when building with vite #2510
manuelleduc
started this conversation in
Ideas & Enhancements
Replies: 2 comments
-
|
On looking into this there are a few candidates for what can slim down the package:
So, if markdown importing & exporting were implemented as separate modules, then the whole build would be 4.39 MB rendered (1.05MB GZip) So, just moving that out of the package would slim down the package by 1/4. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Thanks @nperez0111, that would be a nice first step! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
When building Blocknote with Vite, a chunk of 1,119.73 kB is produced, leading to large JavaScript artifacts being loaded by clients.
To Reproduce
I created a GitHub project to make it easy to reproduce the issue https://github.com/manuelleduc/blocknote-bundle
The project is inspired by the
react-tsproject proposed by Vite https://vite.dev/guide/#trying-vite-online and by Blocknote quick start https://www.blocknotejs.org/docs/quickstartBuild steps:
Example of output logs:
See below a screenshot of
pnpx vite-bundle-visualizer -o stats.htmlLet me know if you know way for me to improve this in a non intrusive way. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions