How to use the @haul-bundler/core.makeConfigFactory function in @haul-bundler/core

To help you get started, we’ve selected a few @haul-bundler/core 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 callstack / haul / packages / haul-preset-0.59 / src / index.ts View on Github external
// JS polyfills for JSC
// Temporary backport of https://github.com/facebook/react-native/blob/v0.55.3/rn-get-polyfills.js
const polyfills = [
  require.resolve('../vendor/polyfills/Object.es6.js'),
  require.resolve('../vendor/polyfills/console.js'),
  require.resolve('../vendor/polyfills/error-guard.js'),
  require.resolve('../vendor/polyfills/Number.es6.js'),
  require.resolve('../vendor/polyfills/String.prototype.es6.js'),
  require.resolve('../vendor/polyfills/Array.prototype.es6.js'),
  require.resolve('../vendor/polyfills/Array.es6.js'),
  require.resolve('../vendor/polyfills/Object.es7.js'),
];

export const withPolyfills = withPolyfillsFactory(polyfills);
export const makeConfig = makeConfigFactory(getDefaultConfig);
github callstack / haul / packages / haul-preset-0.60 / src / index.ts View on Github external
throw new Error(
      `Cannot resolve '${filename}' in [${searchPaths.join(
        ', '
      )}]'. Please make sure you have 'react-native' installed.`
    );
  }
}

const polyfills = [
  resolvePolyfill('console'),
  resolvePolyfill('error-guard'),
  resolvePolyfill('Object.es7'),
];

export const withPolyfills = withPolyfillsFactory(polyfills);
export const makeConfig = makeConfigFactory(getDefaultConfig);