/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/externals/node-prefix/webpack.config.js
23 строки
532 B
Alexander Akait
Respect the node: prefix for node.js core modules used as externals (#21286)
26 июн 2026, 18:55
Не верифицирован
26 июн 2026, 18:55
54fa902
Код
Авторство
О чём код?
"use strict"; /** @type {import("../../../../").Configuration[]} */ module.exports = [ { name: "no-prefix", // target without `node:` support -> the prefix must be stripped from externals target: "node", output: { libraryTarget: "commonjs2", environment: { nodePrefixForCoreModules: false } } }, { name: "prefix", // target with `node:` support -> the authored request is kept verbatim target: "node", output: { libraryTarget: "commonjs2", environment: { nodePrefixForCoreModules: true } } } ];