54ef906832
* perf: use an internal module resolver instead of relative requires * perf: memoize the results of getting exported Electron properties * perf: make internal module changes consistent across sandboxed / bundled files
17 lines
306 B
JavaScript
17 lines
306 B
JavaScript
const moduleList = require('@electron/internal/sandboxed_renderer/api/module-list')
|
|
|
|
for (const {
|
|
name,
|
|
load,
|
|
enabled = true,
|
|
private: isPrivate = false
|
|
} of moduleList) {
|
|
if (!enabled) {
|
|
continue
|
|
}
|
|
|
|
Object.defineProperty(exports, name, {
|
|
enumerable: !isPrivate,
|
|
get: load
|
|
})
|
|
}
|