build headless version
Summary: * Adds `build-headless.js` to bundle the app using metro * the build script replaces the prelude code added by metro with our own to make it work in node. Metro will add an API to add custom prelude code in the next version. * Pins down metro's dependency of `temp` to `v0.9.0` (instead of `0.8.3`) to be compatible with node 10. (This will be fixed in a metro upgrade) Reviewed By: passy Differential Revision: D13786574 fbshipit-source-id: bddb3542c370c068d90a90c4b59337f995e4fa3f
This commit is contained in:
committed by
Facebook Github Bot
parent
dab50ec5c4
commit
7ac6a09af1
@@ -46,7 +46,10 @@ function transform({filename, options, src}) {
|
||||
plugins.push(require('./fb-stubs.js'));
|
||||
}
|
||||
|
||||
if (options.isTestRunner) {
|
||||
if (process.env.BUILD_HEADLESS) {
|
||||
plugins.push(require('./electron-stubs.js'));
|
||||
plugins.push(require('./electron-requires.js'));
|
||||
} else if (options.isTestRunner) {
|
||||
if (process.env.USE_ELECTRON_STUBS) {
|
||||
plugins.push(require('./electron-stubs.js'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user