/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/worker/node-worker-async-node/test.config.js
22 строки
519 B
Alexander Akait
chore: resolve "use strict" TODO (#19705)
16 июл 2025, 17:29
Не верифицирован
16 июл 2025, 17:29
d8690f3
Код
Авторство
О чём код?
"use strict"; const fs = require("fs"); const path = require("path"); module.exports = { findBundle() { return "./bundle.js"; }, afterExecute(options) { const workerCode = fs.readFileSync( path.resolve(options.output.path, "./worker_js.bundle.js"), "utf8" ); if (!/ReadFile \+ VM\.run chunk loading for javascript/.test(workerCode)) { throw new Error( "require('fs').readFile(...) and require('vm').runInThisContext were not found in the worker code for loading async chunks" ); } } };