fix: include snapshot in patches (#539)
This commit is contained in:
committed by
Caleb Boyd
parent
db766e2832
commit
129c2f86a0
@@ -5,7 +5,8 @@ import cli from './disable-node-cli'
|
||||
import flags from './flags'
|
||||
import ico from './ico'
|
||||
import rc from './node-rc'
|
||||
import snapshot from './snapshot'
|
||||
|
||||
const patches = [gyp, bootNexe, buildFixes, cli, flags, ico, rc]
|
||||
const patches = [gyp, bootNexe, buildFixes, cli, flags, ico, rc, snapshot]
|
||||
|
||||
export default patches
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as path from 'path'
|
||||
import { NexeCompiler } from '../compiler'
|
||||
|
||||
export default async function snapshot(compiler: NexeCompiler, next: () => Promise<void>) {
|
||||
@@ -11,8 +12,8 @@ export default async function snapshot(compiler: NexeCompiler, next: () => Promi
|
||||
await compiler.replaceInFileAsync(
|
||||
'configure',
|
||||
'def configure_v8(o):',
|
||||
`def configure_v8(o):\n o['variables']['embed_script'] = '${snapshotFile}'\n o['variables']['warmup_script'] = '${warmupScript ||
|
||||
snapshotFile}'`
|
||||
`def configure_v8(o):\n o['variables']['embed_script'] = r'${path.resolve(snapshotFile)}'\n o['variables']['warmup_script'] = r'${path.resolve(warmupScript ||
|
||||
snapshotFile)}'`
|
||||
)
|
||||
|
||||
return next()
|
||||
|
||||
Reference in New Issue
Block a user