Left some code comments
Summary: Added some additional code comments as requested in earlier diffs Reviewed By: passy Differential Revision: D33361691 fbshipit-source-id: 2d1adc8830af58e6cb7bac4b283a5c0171cf749e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d92c403dd2
commit
ebc4752077
@@ -477,6 +477,11 @@ export async function buildBrowserBundle(outDir: string, dev: boolean) {
|
||||
if (moduleName === 'flipper') {
|
||||
return MetroResolver.resolve(context, 'flipper-ui-core', ...rest);
|
||||
}
|
||||
// stubbed modules are modules that don't make sense outside a Node / Electron context,
|
||||
// like fs, child_process etc etc.
|
||||
// UI / plugins using these features should use the corresponding RenderHost api's instead
|
||||
// Ideally we'd fail hard on those, but not all plugins are properly converted yet, and some
|
||||
// libraries try to require them for feature detection (e.g. jsbase64)
|
||||
if (stubModules.has(moduleName)) {
|
||||
console.warn(
|
||||
`Found a reference to built-in module '${moduleName}', which will be stubbed out. Referer: ${context.originModulePath}`,
|
||||
|
||||
Reference in New Issue
Block a user