Closed nlighteneddesign closed 1 day ago
Firefox does not support modules in service workers: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker#browser_compatibility
I was so excited to use modules directly without bundling the code :(
Ugh Firefox supports them in Worklet API but not Service Worker API
I can't even find the proper Firefox bug. They consider it feature complete, it seems, although it's only for Workers https://bugzilla.mozilla.org/show_bug.cgi?id=1247687
This is an amazing concept, thanks for building it @mglaman. Perhaps a note could be added on the project page, that it doesn't yet work in Firefox?
Yes, I've wanted to push an update on the landing page about Firefox and Safari. I have just been really busy this morning and hopefully I will soon
I feel kinda bad, and almost didn't send the comment, since I didn't want to be a negative downer ... but it sounds great with the update, thanks!
For a Firefox solution, would it help if the Drupal community got involved in the Bugzilla bug Implement "module" service workers and fixing that, or do you think it can be worked around in this project?
No problem I don't see it as being a negative downer at all.
It can be worked around in this project. I need to use Rollup (or Vite to simplify Rollip config) or Webpack to bundle the assets.
Sounds fantastic, I am very much looking forward to trying it.
It's not a full fix, but with https://github.com/mglaman/wasm-drupal/pull/29 the two known browser issues have been linked. And if there is an error loading the service worker (FF) it shows an alert.
I tried with Vite and failed miserably. I'm going to try again later with webpack just for the service worker.
I just learned about https://www.rspack.dev/ which is supposed to be webpack like and way faster
On Wed, Jul 3, 2024, 6:29 PM Matt Glaman @.***> wrote:
I tried with Vite and failed miserably. I'm going to try again later with webpack just for the service worker.
— Reply to this email directly, view it on GitHub https://github.com/mglaman/wasm-drupal/issues/21#issuecomment-2207415032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZPIG6IUSALU52TK4CR5ZDZKR3LVAVCNFSM6AAAAABKHW7YU6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMBXGQYTKMBTGI . You are receiving this because you authored the thread.Message ID: @.***>
Let me take a quick look at this.
It looks like https://github.com/mglaman/wasm-drupal/pull/31 will fix loading. But then there are a handful of other issues, like some files being missing/corrupted. Tracking with https://github.com/mglaman/wasm-drupal/issues/32
Yes, it works and I can install in Firefox, awesome!
And also as mentioned, some files are missing, but there's an issue for that, so that's already on the radar.
When I visit https://wasm-drupal.mglaman.dev/ I only get a loading ... button then I receive this error in the console: