Closed chaoran-chen closed 4 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
dashboard-components | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jul 25, 2024 8:58pm |
There is no change in the changelog.
I'll merge this without reviews as it is otherwise blocking me. Please share if you have concerns about this change!
Did you check what the result of the built output is?
Does the bundled output contain all dependencies? Are some maybe still missing?
A potential disadvantage that I can think of is that the dependencies of this library are bundled into the output so that consuming code can't reuse them (if they use the same libraries).
It seems to contain everything, this codepen works: https://codepen.io/chaoran-chen/pen/KKjNdwj?editors=1000
This increased the library size by a factor of 4:
Before:
[vite:dts] Start generate declaration files...
dist/style.css 106.30 kB │ gzip: 18.97 kB
dist/dashboard-components.js 325.63 kB │ gzip: 64.53 kB │ map: 536.13 kB
After:
[vite:dts] Start generate declaration files...
dist/style.css 106.30 kB │ gzip: 18.97 kB
dist/dashboard-components.js 1,289.58 kB │ gzip: 274.41 kB │ map: 2,439.80 kB
We could, in the future, build two bundles, one with and one without external dependencies.
resolves #399
Summary
This PR changes the vite release config to create a bundle that includes all dependencies.
@fengelniederhammer, @JonasKellerer, do you see some disadvantages of doing that?