Passing URL params to Javascript modules

When you load JavaScript as a module , you get access to import.meta.url , which contains the URL of the module script itself. I first encountered this feature through the Web Worker incantation supported by modern bundlers: new Worker ( new URL ( ' ./worker ' , import . meta . url ), { type : " module " }, ); We'll come back to this. The interesting thing I realized was that I could add params to…