fix: bootstrap file path in node 4.x
This commit is contained in:
committed by
Caleb Boyd
parent
8407f0fc38
commit
34f3ddc26a
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user