It'd be very useful for web workers to be able to use module syntax and get all of the benefits thereof. This would I believe replace the annoying importScript global they use.
At first glance I think you'd need some kind of WorkerModule constructor to allow opt-in to these semantics. Or perhaps you could extend System with some kind of System.work("worker-module-id").then(() => ...)? That sounds nice.
It'd be very useful for web workers to be able to use module syntax and get all of the benefits thereof. This would I believe replace the annoying
importScriptglobal they use.At first glance I think you'd need some kind of
WorkerModuleconstructor to allow opt-in to these semantics. Or perhaps you could extendSystemwith some kind ofSystem.work("worker-module-id").then(() => ...)? That sounds nice.