modernweb-dev / web

Guides, tools and libraries for modern web development.
https://modern-web.dev
MIT License
2.2k stars 277 forks source link

tonejs import slows down development #1230

Open g7alt opened 3 years ago

g7alt commented 3 years ago

I have created a sample project that is generated by npm init @open-wc. A single import from tone.js makes page refreshes in development very slow. I could not figure out why? vitejsfor example works as expected.

https://github.com/narasab/web-dev-server-tone

LarsDenBakker commented 3 years ago

There are solutions here, all with different pros and cons. For example we can utilize modern es module with pre-bundled packages, bundle node modules on the fly with esbuild or add more aggressive caching headers for node modules (sacrificing easy editing of dependencies).