I'm migrating an existing worker from service worker to ES module format. Not a huge deal, with one

I'm migrating an existing worker from service worker to ES module format. Not a huge deal, with one caveat. Before I was accessing environment variables as globals, now they're are in the environment object. Are people just plumbing that environment object through layers of their code or is there a more elegant way to handle things? I'm finding myself adding env to a large quanity of my functions just to get access to things where I need them.
Was this page helpful?