Enable Metro caching
Summary: Enabling Metro cache for dev mode. For release builds we reset the cache. Cache is used for faster compilation in dev mode for both main and renderer bundles, as well as for plugins. Currently we have few side effects based on env vars, so cache is invalidated when they are changed. Also the cache is invalidated when transformations are changed (changed code, bumped dependency etc). Also added a script to reset the cache if something is going wrong. Reviewed By: mweststrate Differential Revision: D20691464 fbshipit-source-id: 478947d438bd3090f052dbfa6ad5c649523ecacb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d86da8f1d2
commit
da7449c20b
@@ -98,7 +98,7 @@ async function createZip(buildDir: string, distDir: string, targets: string[]) {
|
||||
// developement iteration by not including any plugins.
|
||||
const skipPlugins = process.argv.indexOf('--no-plugins') > -1;
|
||||
|
||||
process.env.BUILD_HEADLESS = 'true';
|
||||
process.env.FLIPPER_HEADLESS = 'true';
|
||||
const buildDir = await buildFolder();
|
||||
// eslint-disable-next-line no-console
|
||||
console.log('Created build directory', buildDir);
|
||||
|
||||
Reference in New Issue
Block a user