fix: remove hasLoadedAnyUserCJSModule assertion to fix startup. (#743)

This commit is contained in:
bruce-one
2020-04-03 11:11:02 +11:00
committed by GitHub
parent 56dfef1e45
commit de6bb58a10
+5
View File
@@ -70,6 +70,11 @@ export default async function main(compiler: NexeCompiler, next: () => Promise<v
'initializePolicy();',
'initializePolicy();\n' + wrap('{{replace:lib/patches/boot-nexe.js}}')
)
await compiler.replaceInFileAsync(
bootFile,
'assert(!CJSLoader.hasLoadedAnyUserCJSModule)',
'/*assert(!CJSLoader.hasLoadedAnyUserCJSModule)*/'
)
await compiler.replaceInFileAsync(
'src/node.cc',
'MaybeLocal<Value> StartMainThreadExecution(Environment* env) {',