/
githubmirror
/
webpack
Обзор
Документация
Войти
/
githubmirror
/
webpack
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
test/configCases/plugins/provide-plugin-require-binding/index.js
14 строк
334 B
zoomdong
fix: avoid ProvidePlugin injection for local const require bindings (#21041)
26 май 2026, 14:04
Не верифицирован
26 май 2026, 14:04
a87ce98
Код
Авторство
О чём код?
const process = require("./process"); const originalCwd = process.cwd; process.cwd = () => `${originalCwd()}/provided`; const nodePolyfills = { process }; it("should not provide for a const require binding with the same name", () => { expect(nodePolyfills.process.cwd()).toBe("/cwd/provided"); }); export default nodePolyfills;