// @flow

/* eslint-disable require-await */
/**
 * Metro configuration for React Native
 * https://github.com/facebook/react-native
 *
 * @format
 */

const path = require('path');

const { IS_CI } = process.env;

const sharedBlacklist = [
  /node_modules[/\\]react[/\\]dist[/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /\.build[/\\].*/,
  /ios[/\\]build[/\\].*/,
  // /.*\/__tests__\/.*/,
];

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    blacklistRE: new RegExp(
      '(' +
        sharedBlacklist
          .map(regexp => regexp.source.replace(/\//g, path.sep))
          .join('|') +
        ')$',
    ),
  },
  useWatchman: IS_CI === undefined,
};

// @flow

/* eslint-disable require-await */
/**
 * Metro configuration for React Native
 * https://github.com/facebook/react-native
 *
 * @format
 */

const path = require('path');

const sharedBlacklist = [
  /node_modules[/\\]react[/\\]dist[/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /\.build[/\\].*/,
  /ios[/\\]build[/\\].*/,
  // /.*\/__tests__\/.*/,
];

module.exports = {
  transformer: {
    getTransformOptions: async () => ({
      transform: {
        experimentalImportSupport: false,
        inlineRequires: false,
      },
    }),
  },
  resolver: {
    blacklistRE: new RegExp(
      '(' +
        sharedBlacklist
          .map(regexp => regexp.source.replace(/\//g, path.sep))
          .join('|') +
        ')$',
    ),
  },
};

Revert "Deactivate watchman on CI"
Revert "Deactivate watchman on CI"

This reverts commit 140770d43013dd8ca54c2031f93c344ee5c59f89.
This did not fix CI problems
