package bundle
Summary: For the electron build, plugins are bundled with the app and loaded from there at launch. The headless version can't require from its binary, so plugins need to be required from another path. This diff makes the path where bundled plugins are loaded from adjustable via an environment variable: `BUNDLED_PLUGIN_PATH`. If it's set, the plugins are loaded from this path, otherwise we default to the old behaviour of including them from `./defaultPlugins`. For the headless version we expect the plugins to be in a folder called `plugins` next to the executable. This should later be configurable via an argument passed to the CLI. Reviewed By: passy Differential Revision: D13843676 fbshipit-source-id: 04237ae6631b4f2ba56887fe992a56f860724edc
This commit is contained in:
committed by
Facebook Github Bot
parent
d512c97cab
commit
5b68c59b5c
@@ -135,7 +135,7 @@ function copyStaticFolder(buildFolder) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Created build directory', dir);
|
||||
await copyStaticFolder(dir);
|
||||
await compileDefaultPlugins(dir);
|
||||
await compileDefaultPlugins(path.join(dir, 'defaultPlugins'));
|
||||
await compile(dir, path.join(__dirname, '..', 'src', 'init.js'));
|
||||
const versionNumber = await modifyPackageManifest(dir);
|
||||
generateManifest(versionNumber);
|
||||
|
||||
Reference in New Issue
Block a user