INNER CODE UNIT · JavaScript

getCacheKey

react/metro · packages/metro-babel-transformer/src/index.js:170

function getCacheKey(options?: BabelTransformerCacheKeyOptions): string {
  if (options == null) {
    return '';
  }
  // Load the partial babel config to get the resolved config file paths
  const partialConfig = loadPartialConfigSync({
    cwd: options.projectRoot,
    root: options.projectRoot,
    babelrc: options.enableBabelRCLookup ?? true,
  });

  const files = partialConfig?.files;

  if (files == null || files.size === 0) {
    return '';
  }

  // Hash the contents of all config files

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…