In line comparison url-loader It's a lot easier to introduce , And there won't be require Function cannot find the problem
import IWorker from "worker-loader!./worker.js" let worker = new IWorker()
In theory, it is possible to introduce worker The files are stripped out , also worker Functions in other files can also be introduced in
But it doesn't seem to work , As long as worker in import Other documents , Just report a mistake .....
emm, There's something wrong with the code , But it's also hard , Because the error does not display the line number , You can only look it up line by line