How to use the @haul-bundler/core.getBabelConfigPath 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 / defaultConfig.ts View on Github external
path: assetsDest || root,
      publicPath: `http://${host}:${port}/`,
      globalObject: 'this',
    },
    module: {
      rules: [
        { parser: { requireEnsure: false } },
        {
          test: /\.[jt]sx?$/,
          // eslint-disable-next-line no-useless-escape
          exclude: /node_modules(?!.*[\/\\](react|@react-navigation|@react-native-community|@expo|pretty-format|@haul-bundler|metro))/,
          use: [
            {
              loader: require.resolve('babel-loader'),
              options: {
                extends: getBabelConfigPath(root),
                plugins: [
                  require.resolve(
                    '@haul-bundler/core/build/utils/fixRequireIssues'
                  ),
                ],
                /**
                 * to improve the rebuild speeds
                 * This enables caching results in ./node_modules/.cache/babel-loader//
                 * This is a feature of `babel-loader` and not babel
                 */
                cacheDirectory: dev
                  ? path.join(
                      root,
                      'node_modules',
                      '.cache',
                      'babel-loader',
github callstack / haul / packages / haul-preset-0.60 / src / defaultConfig.ts View on Github external
path: assetsDest || root,
      publicPath: `http://${host}:${port}/`,
      globalObject: 'this',
    },
    module: {
      rules: [
        { parser: { requireEnsure: false } },
        {
          test: /\.[jt]sx?$/,
          // eslint-disable-next-line no-useless-escape
          exclude: /node_modules(?!.*[\/\\](react|@react-navigation|@react-native-community|@expo|pretty-format|@haul-bundler|metro))/,
          use: [
            {
              loader: require.resolve('babel-loader'),
              options: {
                extends: getBabelConfigPath(root),
                plugins: [
                  require.resolve(
                    '@haul-bundler/core/build/utils/fixRequireIssues'
                  ),
                ],
                /**
                 * to improve the rebuild speeds
                 * This enables caching results in ./node_modules/.cache/babel-loader/
                 * This is a feature of `babel-loader` and not babel
                 */
                cacheDirectory: dev
                  ? path.join(
                      root,
                      'node_modules',
                      '.cache',
                      'babel-loader',