How to use the metro-cache.FileStore function in metro-cache

To help you get started, we’ve selected a few metro-cache examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github godaddy / ekke / api / metro / configure.js View on Github external
async function configure(flags) {
  const reactNativePath = path.dirname(require.resolve('react-native/package.json'));
  const config = await loadConfig();
  const custom = {
    resolver: {},
    serializer: {},
    transformer: {},
    cacheStores: [
      new FileStore({
        root: flags['cache-location']
      })
    ]
  };

  //
  // We need to create a fake package name that we will point to the root
  // of the users directory so we can resolve their requires and test files
  // without having to rely on `package.json` based resolve due to poor
  // handling of absolute and relative paths.
  //
  // See: https://github.com/facebook/react-native/issues/3099
  //
  const fake = 'ekke-ekke-ekke-ekke';

  //

metro-cache

🚇 Cache layers for Metro.

MIT
Latest version published 3 days ago

Package Health Score

89 / 100
Full package analysis

Similar packages