How to use the react-app-rewired.paths.appSrc function in react-app-rewired

To help you get started, we’ve selected a few react-app-rewired 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 MarvenGong / fastmock / f2e / config-overrides.js View on Github external
module.exports = function override(config, env) {
  config = injectBabelPlugin(
    ['import', { libraryName: 'antd', libraryDirectory: 'es', style: true }], config
  );
  config = rewireAliases.aliasesOptions({
    '@': path.resolve(__dirname, `${paths.appSrc}/`),
    '@components': path.resolve(__dirname, `${paths.appSrc}/components/`)
  })(config, env);
  config = rewireLess.withLoaderOptions({
    modifyVars: { '@primary-color': '#4452d5', '@link-color': '#4452d5' },
    javascriptEnabled: true
  })(config, env);
  return config;
};