build: tsify asar and move to webpack js2c pipeline (#24495)

* build: tsify asar and move to webpack js2c pipeline

* build: use the webpack provider for fs-wrapper
This commit is contained in:
Samuel Attard 2020-07-16 11:38:31 -07:00 committed by GitHub
parent 4c3da359fc
commit f649e604be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 889 additions and 814 deletions

View file

@ -1,18 +0,0 @@
// This file provides the global, process and Buffer variables to internal
// Electron code once they have been deleted from the global scope.
//
// It does this through the ProvidePlugin in the webpack.config.base.js file
// Check out the Module.wrapper override in renderer/init.ts for more
// information on how this works and why we need it
// Rip global off of window (which is also global) so that webpack doesn't
// auto replace it with a looped reference to this file
const _global = (self as any || window as any).global as NodeJS.Global;
const process = _global.process;
const Buffer = _global.Buffer;
export {
_global,
process,
Buffer
};