1

I am trying to use the following SO answer in order to start a web worker without a separate js file:

https://stackoverflow.com/a/19201292

But I am using TypeScript and Webpack. And inside the function, I have a line like:

let a = new XYZ();

where XYZ is an exported class in another file.

But I get the

"Uncaught ReferenceError: XYZ_1 is not defined"

error at runtime.

How can this be resolved?

John L.
  • 1,597
  • 2
  • 13
  • 33

0 Answers0