The Worker must reference a .js
file.
If a Javascript project need to export 1 single .js
file, and this project needs to use Worker for process.
So the project has to handle code in sub process
and code in main process
together.
Is it possible to handle this problem, to make code looks elegant in 1 single .js
file when using Worker?