/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/worker/node-worker-async-node/worker.js
13 строк
445 B
Alexander Akait
Cut Bun test skips down to the few cases Bun genuinely can't run (#21239)
21 июн 2026, 21:58
Не верифицирован
21 июн 2026, 21:58
10f5fcc
Код
Авторство
О чём код?
import { parentPort } from "worker_threads"; const chunk = import("./chunk.js"); // Attach the listener synchronously (before the top-level await) so a message // posted during the worker's async startup isn't missed. parentPort.on("message", async (msg) => { const { getMessage } = await chunk; parentPort.postMessage(getMessage(msg)); }); // Keep this a top-level-await (async) module to exercise async-module worker output. await chunk;