fix: serialize shims/resources in upstream step

closes #677
This commit is contained in:
calebboyd
2019-10-09 12:19:12 -05:00
parent 4112bd7b3e
commit 1e54736fec
5 changed files with 201 additions and 361 deletions
+3 -3
View File
@@ -1,7 +1,9 @@
import { NexeCompiler } from '../compiler'
import { wrap } from '../util'
export default function(compiler: NexeCompiler, next: () => Promise<void>) {
export default async function(compiler: NexeCompiler, next: () => Promise<void>) {
await next()
compiler.shims.push(
wrap(
`process.__nexe = ${JSON.stringify(compiler.binaryConfiguration)};\n` +
@@ -32,6 +34,4 @@ export default function(compiler: NexeCompiler, next: () => Promise<void>) {
}
`)
)
return next()
}