n1ru4l/bundle-anywhere

Pre-optimize / Cache big npm packages

Opened this issue · 0 comments

Vite.js pre-bundles big dependencies into a single flat file, for faster re-builds (https://github.com/vitejs/vite/blob/main/packages/vite/src/node/optimizer/index.ts). It might be worth exploring the same as dependencies that are not distributed as bundles (such as graphql-js) cause big request waterfalls.

Maybe pre-bundling and storing those dependencies using the Web Storage API, might improve performance (https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API)