Summary: The build process for the server was a simple ts-node that compiled all deps. However, that didn't do any source transformations we need, like replacing `fb-stubs` with `fb` in facebook builds. This diff works out the dev build process to align more with how other parts of the code base is build, by starting metro to build and bundle the server (only the sources of flipper-server, flipper-server-core and other flipper packages are bundled, node-deps are left as is). To achieve this, since metro doesn't have support for 'external' packages like any arbitrarily other bundler, we recycle the electronRequire work around that is used in the desktop app as well Reviewed By: aigoncharov Differential Revision: D32949677 fbshipit-source-id: 00d326bb17b68aece6fb43af98d0def13b335e74
26 lines
862 B
TypeScript
26 lines
862 B
TypeScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
import path from 'path';
|
|
|
|
export const rootDir = path.resolve(__dirname, '..');
|
|
export const appDir = path.join(rootDir, 'app');
|
|
export const staticDir = path.join(rootDir, 'static');
|
|
export const serverDir = path.join(rootDir, 'flipper-server');
|
|
export const defaultPluginsDir = path.join(staticDir, 'defaultPlugins');
|
|
export const pluginsDir = path.join(rootDir, 'plugins');
|
|
export const fbPluginsDir = path.join(pluginsDir, 'fb');
|
|
export const publicPluginsDir = path.join(pluginsDir, 'public');
|
|
export const distDir = path.resolve(rootDir, '..', 'dist');
|
|
export const babelTransformationsDir = path.resolve(
|
|
rootDir,
|
|
'babel-transformer',
|
|
'src',
|
|
);
|