/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/worker/node-worker-require/test.config.js
22 строки
455 B
Alexander Akait
test: worker loading chunks (#19716)
22 июл 2025, 15:04
Не верифицирован
22 июл 2025, 15:04
8138c79
Код
Авторство
О чём код?
"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 (!/require\(\) chunk loading for javascript/.test(workerCode)) { throw new Error( "require was not found in the worker code for loading async chunks" ); } } };