Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize bundle size #179

Open
oskarrough opened this issue May 25, 2024 · 1 comment · May be fixed by #180
Open

Optimize bundle size #179

oskarrough opened this issue May 25, 2024 · 1 comment · May be fixed by #180
Labels
enhancement New feature or request

Comments

@oskarrough
Copy link
Contributor

oskarrough commented May 25, 2024

Our JavaScript for the components is 1.5mb. Considering we don't even have a framework™️ it's a lot.

dist/index-Dv1Vd9fA.js             1,499.01 kB │ gzip: 357.64 kB

However most of it is the dependency on ol (for the map) as far as I know.

The site is definitely not slow even with the big bundle. It's cached. But we could still try to 1) reduce the size 2) split the big dependencies into other bundles? Like only load ol once the r4-map component is connected. But don't know how that would work.

@oskarrough oskarrough added the enhancement New feature or request label May 25, 2024
@oskarrough
Copy link
Contributor Author

Tried using the manualChunks feature of Rollup to split up the big ones. Not sure what effect it would have on performance in the end, or when the chunks are loaded.

dist/supabase-BzIw9nIb.js          180.56 kB │ gzip:  41.93 kB
dist/r4playerv1-BZf4AAU1.js        263.37 kB │ gzip:  67.23 kB
dist/ol-af2OZp3O.js                514.88 kB │ gzip: 114.13 kB
dist/r4.js                         539.59 kB │ gzip: 136.02 kB

@oskarrough oskarrough linked a pull request May 26, 2024 that will close this issue
@linear linear bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@oskarrough oskarrough reopened this Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant