build: drop @types/webpack-env in favor of webpack/module types (#47798)
* build: drop @types/webpack-env in favor of webpack/module types * chore: improve type when assigning to global.require
This commit is contained in:
parent
51add3e847
commit
a201d6c541
10 changed files with 24 additions and 25 deletions
|
@ -13,9 +13,9 @@ require('@electron/internal/common/init');
|
|||
const { hasSwitch, getSwitchValue } = process._linkedBinding('electron_common_command_line');
|
||||
|
||||
// Export node bindings to global.
|
||||
const { makeRequireFunction } = __non_webpack_require__('internal/modules/helpers');
|
||||
const { makeRequireFunction } = __non_webpack_require__('internal/modules/helpers') as typeof import('@node/lib/internal/modules/helpers');
|
||||
global.module = new Module('electron/js2c/worker_init');
|
||||
global.require = makeRequireFunction(global.module);
|
||||
global.require = makeRequireFunction(global.module) as NodeRequire;
|
||||
|
||||
// See WebWorkerObserver::WorkerScriptReadyForEvaluation.
|
||||
if ((globalThis as any).blinkfetch) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue