How to use the react-scripts/config/webpack.config.dev.resolve function in react-scripts

To help you get started, we’ve selected a few react-scripts 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 demokratie-live / democracy-client / scripts / start.web.js View on Github external
process.env.NODE_ENV = 'production';
const path = require('path');

const webpackConfigProd = require('react-scripts/config/webpack.config.dev');

webpackConfigProd.module.rules.push({
  test: /\.ttf$/,
  loader: 'url-loader', // or directly file-loader
  include: path.resolve(__dirname, 'node_modules/react-native-vector-icons'),
});

webpackConfigProd.resolve.alias['react-native-vector-icons/Ionicons'] =
  'react-native-vector-icons/dist/Ionicons';
webpackConfigProd.resolve.alias['react-native-vector-icons/MaterialIcons'] =
  'react-native-vector-icons/dist/MaterialIcons';

require('react-scripts/scripts/start');
github demokratie-live / democracy-client / scripts / start.web.js View on Github external
process.env.NODE_ENV = 'production';
const path = require('path');

const webpackConfigProd = require('react-scripts/config/webpack.config.dev');

webpackConfigProd.module.rules.push({
  test: /\.ttf$/,
  loader: 'url-loader', // or directly file-loader
  include: path.resolve(__dirname, 'node_modules/react-native-vector-icons'),
});

webpackConfigProd.resolve.alias['react-native-vector-icons/Ionicons'] =
  'react-native-vector-icons/dist/Ionicons';
webpackConfigProd.resolve.alias['react-native-vector-icons/MaterialIcons'] =
  'react-native-vector-icons/dist/MaterialIcons';

require('react-scripts/scripts/start');