fix: bootstrap file path in node 4.x

This commit is contained in:
James M. Greene
2018-03-13 15:10:32 -05:00
committed by Caleb Boyd
parent 8407f0fc38
commit 34f3ddc26a
+3 -1
View File
@@ -4,7 +4,9 @@ import { join } from 'path'
import { wrap } from '../util'
export default async function main(compiler: NexeCompiler, next: () => Promise<void>) {
const file = await compiler.readFileAsync('lib/internal/bootstrap_node.js')
const bootPath =
(compiler.target.version.startsWith('4') ? 'src/' : 'lib/internal/bootstrap_') + 'node.js'
const file = await compiler.readFileAsync(bootPath)
const parts = file.contents.split('function(process) {')
file.contents =
parts[0] + `function(process) {` + '{{replace:lib/patches/bootstrap.js}}' + parts[1]