How to use the customize-cra.useBabelRc function in customize-cra

To help you get started, we’ve selected a few customize-cra 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 ashik112 / extensive-react-skeleton / config-overrides.js View on Github external
/* eslint-disable */
/* config-overrides.js */
const {
  useBabelRc, override, fixBabelImports, addLessLoader,
} = require('customize-cra');
const path = require('path');
module.exports = override(
  useBabelRc(),
  fixBabelImports('import', {
    libraryName: 'antd',
    libraryDirectory: 'es',
    style: true,
  }),
  addLessLoader({
    javascriptEnabled: true,
    modifyVars: {
      'hack': `true; @import "${ path.resolve(__dirname, 'src/styles/less/theme.less')}";`,// Override with less file
    },
  }),
);
github ggoodman / velcro / packages / playground / config-overrides.js View on Github external
//@ts-check
'use strict';

const { addWebpackPlugin, override, useBabelRc, addWebpackAlias } = require('customize-cra');
const MonacoEditorWebpackPlugin = require('monaco-editor-webpack-plugin');
const WorkerPlugin = require('worker-plugin');

module.exports = override(
  addWebpackPlugin(new MonacoEditorWebpackPlugin()),
  addWebpackPlugin(new WorkerPlugin()),
  useBabelRc(),
  addWebpackAlias({
    '@velcro/bundler': '@velcro/bundler/dist/dist-module/index.js',
    '@velcro/resolver-host-compound': '@velcro/resolver-host-compound/dist/dist-module/index.js',
    '@velcro/resolver-host-unpkg': '@velcro/resolver-host-unpkg/dist/dist-module/index.js',
    '@velcro/resolver': '@velcro/resolver/dist/dist-module/index.js',
  })
);
github SusieChang / react-app / config-overrides.js View on Github external
useBabelRc
} = require('customize-cra')
const path = require('path')
const theme = require('./package.json').theme
module.exports = {
  webpack: override(
    addWebpackAlias({
      '@components': path.resolve(__dirname, 'src/components'),
      '@assets': path.resolve(__dirname, 'src/assets'),
      '@layouts': path.resolve(__dirname, 'src/layouts'),
      '@utils': path.resolve(__dirname, 'src/utils'),
      '@store': path.resolve(__dirname, 'src/store'),
      '@containers': path.resolve(__dirname, 'src/containers'),
      '@services': path.resolve(__dirname, 'src/services')
    }),
    useBabelRc(),
    fixBabelImports('import', {
      libraryName: 'antd-mobile',
      libraryDirectory: 'lib',
      style: true,
      legacy: true
    }),
    addLessLoader({
      javascriptEnabled: true,
      modifyVars: theme
    }),
    addDecoratorsLegacy({
      legacy: true
    })
  )
}
github runelite / runelite.net / config-overrides.js View on Github external
redirect: {
          url: link
        },
        template: 'redirect.html',
        filename: key + '/index.html',
        inject: false,
        xhtml: false
      })
    )
  }

  return config
}

module.exports = override(
  useBabelRc(),
  useEslintRc(),
  addWebpackAlias({
    react: 'preact/compat',
    'react-dom': 'preact/compat'
  }),
  addSitePlugins()
)