* Replace deprecated terser plugin
* Update Node version
* Fix build on windows
* Use path resolve instead of posix
---------
Co-authored-by: robo-mop <realaryanpingle@gmail.com>
I've added support for `new URL(..., import.meta.url)` pattern accepted by many bundlers to wasm-bindgen and Emscripten, both for Wasm files as well as for side Workers autogenerated to support multithreading.
On the apps side like Squoosh this means we no longer have to manually specify URLs to be passed to wasm-bindgen or Emscripten init functions. In this PR I'm primarily doing just that - removing all the manual Wasm URL locators, as well as the associated logic.
One notable change on the build system side is that, in order for Wasm and multithreading-related Workers to be detected as dependencies, I'm now walking over `referencedFiles` in addition to `imports` when collecting list of dependencies in `getDependencies` function (client-bundle-plugin.js).
As a side effect, it also included other linked assets - images and CSS - which simplified quite a few caching lists in to-cache.ts as well. Instead of having to manually specify each asset that needs to be included, the logic is inverted and only few extra assets had to be excluded to keep the list of in items cached on the first load as low as it was before the change.
All in all, I think this simplification is worth it and even helped to accidentally uncover & fix one caching bug where WP2 regular JS was cached in addition to WP2 multithreaded JS simultaneously.
Emscripten uses dynamic `import(fullUrlOfTheMainJS)` in generated Workers.
It appears that upstream rollup-plugin-off-main-thread never handled this correctly, but we had a customization in Squoosh loader template that allowed those anyway, which I removed together with most other customizations in #1007, thus breaking Emscripten codecs.
This adds a hotfix back, but we need to fix this properly upstream too (TBD separately).
* WIP: wasm-bindgen-rayon and new OMT plugin
* Bump package-lock
* Make OMT work again
* Update year
* Restore accidental change
* Prevent minification of `nextDefineUri`
* Delay loading external deps
This gives inline `define` calls a chance to define dependencies for earlier `define` calls on the same page.
* Add comment
* Cache correct assets
* Update lib/entry-data-plugin.js
Co-authored-by: Surma <surma@surma.dev>
* Actually commit the fix this time
Co-authored-by: Surma <surma@surma.dev>
* Paste button
* Logo and animated blobs
* Predictable initial blob position
* Initial blob shape
* Update canvas on resize if not updating every frame
* lol
* Get styles from CSS
* Background blobs
* Fade into the center
* Get initial focus
* Pause time while page is hidden
* Footer
* Optimise amount of initial CSS
* More CSS optimisation
* Install button
* Home page with demo loading
* Tweak size
* Replace thumbnails
* Responsive demo section
* Responsive main section
* Remove debug stuff
* Fix prerender SVG size
* Changes from feedback
* Blob nudges (#872)
* more smaller blobs
* less blobs that are practically invisible
* more dynamic speed range and stronger gravity
* Reverting resize observer change
The content rect is different to getBoundingClientRect
Co-authored-by: Adam Argyle <atom@argyleink.com>