I am using ES2015 Import / Export modules.
In my worker file, when I try to import functions like I normally do:
worker.js
i
ES2015 modules in Workers are currently implemented in chromium only.
For other browsers you have to use importScripts().
You create a worker like this:
new Worker("worker.js", { type: "module" });
See: https://html.spec.whatwg.org/#module-worker-example
These are the bug-reports for each browser (please vote!):