Add --public-build option to start an OSS like build of Flipper

Summary: This diff adds the `--public-build` option which allows run a devServer emulating the OSS version of flipper. Technical details are explained in the comments.

Reviewed By: passy, nikoant

Differential Revision: D25944966

fbshipit-source-id: 540855808179582752b8aa646f0b8afd4b78396f
This commit is contained in:
Michel Weststrate
2021-01-18 06:45:17 -08:00
committed by Facebook GitHub Bot
parent 7a1717fa87
commit 9cdb36ec0e
3 changed files with 20 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ module.exports = () => ({
visitor: {
CallExpression(path: NodePath<CallExpression>, state: any) {
if (
process.env.FLIPPER_FORCE_PUBLIC_BUILD !== 'true' &&
path.node.type === 'CallExpression' &&
path.node.callee.type === 'Identifier' &&
path.node.callee.name === 'require' &&