有没有办法将 ts-node 与 WebWorkers 一起使用但不使用 webpack?
当我做:
const worker = new Worker('path-to/workerFile.ts', { // ... });
我得到:
TypeError [ERR_WORKER_UNSUPPORTED_EXTENSION]:
The worker script extension must be ".js" or ".mjs". Received ".ts" at new Worker (internal/worker.js:272:15)
// ....
有任何想法吗?
托默