How to use the react-app-rewired.compose 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 videomanagertools / scraper / config-overrides.js View on Github external
module.exports = function override(config, env) {
    config = injectBabelPlugin([
        'import', {
            libraryName: 'antd',
            libraryDirectory: 'es',
            style: 'css'
        }
    ], config);
    const rewires = compose(rewireLess.withLoaderOptions({
        modifyVars: {
            // "@primary-color": "#DB7093",
            // "@info-color": "#DB7093",
            // "@layout-body-background": "#fff"
        }
    }));

    return rewires(config, env);
};
github humanmade / Workflows / admin / config-overrides.js View on Github external
module.exports = function ( config, env ) {
	const rewires = compose(
		rewireStyledComponents,
		rewireSVG,
	);

	// Set SC_ATTR env var.
	config.plugins.push( new webpack.EnvironmentPlugin( {
		SC_ATTR: 'data-styled-components-hm-workflows',
	} ) );

	// Set externals.
	config.externals = Object.assign( config.externals || {}, {
		HM: 'HM',
	} );

	return rewires( config, env );
}
github andriijas / monkey-admin / config-overrides.js View on Github external
const cssLoader = getLoader(
      config.module.rules,
      rule => String(rule.test) === String(/\.module\.css$/),
    ).loader.find(loader => loaderNameMatches(loader, "css-loader"));
    cssLoader.options.localIdentName = "ma-[hash:base64:8]";

    // Include bundle analyzation
    config.plugins.push(
      new BundleAnalyzerPlugin({
        analyzerMode: "static",
        openAnalyzer: false,
      }),
    );
  }

  const rewires = compose(
    rewireLess.withLoaderOptions({
      javascriptEnabled: true,
      modifyVars: {
        "@primary-color": "#ff79c6",
        "@info-color": "#61dafb",
        "@layout-body-background": "#EEEEF0",
        "@layout-header-background": "#fff",
        "@layout-sider-background": "#282A36",
        "@menu-dark-bg": "#282A36",
        "@menu-dark-submenu-bg": "#000a0a",
      },
    }),
  );

  return rewires(config, env);
};
github mgm-interns / team-radio / client / config-overrides.js View on Github external
module.exports = (config, env) => {
  // global config
  config = compose(rewireTypescript)(config, env);

  config.resolve.modules.push(Path.resolve(process.cwd(), 'src'));

  // Production config
  if (env === 'production') {
  }
  // Development config
  else {
    config.module.rules.push({
      test: /\.(ts|tsx)$/,
      enforce: 'pre',
      exclude: /node_modules/,
      use: [
        {
          loader: 'prettier-loader',
          options: JSON.parse(Fs.readFileSync(Path.resolve('..', '.prettierrc'), 'utf8'))
github mgm-interns / team-radio / admin / config-overrides.js View on Github external
module.exports = (config, env) => {
  // global config
  config = compose(rewireTypescript)(config, env);

  config.resolve.modules.push(Path.resolve(process.cwd(), 'src'));

  // Production config
  if (env === 'production') {
  }
  // Development config
  else {
    config = rewireReactHotLoader(config, env);

    config.module.rules.push({
      test: /\.(ts|tsx)$/,
      enforce: 'pre',
      exclude: /node_modules/,
      use: [
        {
github nos / client / config-overrides.js View on Github external
});

  return config;
}

function injectExternal(external) {
  return (config, _env) => {
    return merge(config, {
      externals: {
        [external]: `commonjs ${external}`
      }
    });
  };
}

module.exports = compose(
  injectTarget,
  injectSassLoader,
  injectPublicPath,
  rewireBabel,
  injectExternal('@cityofzion/neon-js'),
  injectExternal('node-hid')
);
github eoscostarica / eos-dapp-boilerplate / react-demux-scatter / services / frontend / config-overrides.js View on Github external
const { compose } = require('react-app-rewired')
const rewireEslint = require('react-app-rewire-eslint')
const rewireReactHotLoader = require('react-app-rewire-hot-loader')

module.exports = compose(
  rewireEslint,
  rewireReactHotLoader
)
github humanmade / hm-platform / config-overrides.js View on Github external
module.exports = function ( config, env ) {
	const rewires = compose(
		rewireStyledComponents,
		rewireSVG,
	);

	return rewires( config, env );
}
github src-d / gitbase-web / frontend / config-overrides.js View on Github external
const { compose } = require('react-app-rewired');
const rewireLess = require('react-app-rewire-less');
const rewireSvgReactLoader = require('react-app-rewire-svg-react-loader');

module.exports = compose(rewireLess, rewireSvgReactLoader);
github dogecodes / react-chat / config-overrides.js View on Github external
const { compose } = require('react-app-rewired');
const rewireEslint = require('react-app-rewire-eslint');
const rewirePolyfills = require('react-app-rewire-polyfills');

module.exports = compose(rewirePolyfills, rewireEslint);