andywer / andywer/threads.js

Typescript workers don't work with ESM

未关闭
#434 8 条评论 10 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
3.5k
派生
173
PR 合并指标
30 天内没有已合并 PR

描述

Thank you for this library!

Using [Typescript Workers](https://threads.js.org/usage#typescript-workers-in-nodejs) with `"type": "module"` in `package.json` produces an error:
```
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /home/alexk/code/threads-ts-node-esm-issue/src/worker.ts
require() of ES modules is not supported.
```

See reproduction https://github.com/lynxtaa/threads-ts-node-esm-issue

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。