GoogleChrome / workbox

📦 Workbox: JavaScript libraries for Progressive Web Apps
https://developers.google.com/web/tools/workbox/
MIT License
12.3k stars 811 forks source link

Support wasm files by default in globPatterns #3319

Open ArhanChaudhary opened 5 months ago

ArhanChaudhary commented 5 months ago

The default value of globPatterns is ["*\/.{js,css,html}"]

I think it would be perfectly reasonable to also serve wasm files through workbox by changing this default to ["*\/.{js,wasm,css,html}"]

Javascript and wasm are supposed to be used together. Having Javascript served through workbox while wasm through the network can result in a confusing version mismatch, footgunning future devlopment.

I originally came from this issue raised by another developer who shared a similar sentiment https://github.com/vite-pwa/vite-plugin-pwa/issues/308