I am using ES2015 Import / Export modules.
In my worker file, when I try to import functions like I normally do:
worker.js
i
Chrome 80 has shipped module workers in February 2020 (and Chrome 82 will ship modules for shared workers). Firefox/Safari do not support those features for now: tests
You may use want to use import-from-worker lib to do the heavy lifting for you (for now, you need to check the support for modules in workers and do the fallback yourself).