scripts/build/bundler.js/webpackNativeShims
function webpackNativeShims(config, modules) {
  if (!config.resolve) {
    config.resolve = {};
  }
  const { resolve } = config;
  resolve.alias = resolve.alias || {};
  resolve.fallback = resolve.fallback || {};
  for (const module of modules) {
    if (module in resolve.alias || module in resolve.fallback) {
      throw new Error(`fallback/alias for "${module}" already exists.`);
    }
    const file = path.join(__dirname, `shims/${module}.mjs`);
    if (fs.existsSync(file)) {
      resolve.alias[module] = file;
    } else {
      resolve.fallback[module] = false;
    }
  }
  return config;
}