Transform fb-internal code within plugins

Summary: This diff changes flipper-pkg to allow using fb-internal code in plugins when they are packaged as standalone packages. It basically transforms fb-stubs/fb folders in plugins in the same way as for Flipper app.

Reviewed By: passy

Differential Revision: D27173406

fbshipit-source-id: 8ba97d5f57b5e276c19d13270a0d810873504add
This commit is contained in:
Anton Nikolaev
2021-04-09 05:15:14 -07:00
committed by Facebook GitHub Bot
parent b45b5f854a
commit 4d3e631ce6
6 changed files with 35 additions and 22 deletions

View File

@@ -17,10 +17,7 @@ const presets = [
{targets: {electron: flipperEnv.FLIPPER_ELECTRON_VERSION}},
],
];
const plugins = [require('./electron-requires-main')];
if (flipperEnv.FLIPPER_FB) {
plugins.unshift(require('./fb-stubs'));
}
const plugins = [require('./electron-requires-main'), require('./fb-stubs')];
module.exports = {
transform,