How to use the @expo/webpack-config/utils.getMode function in @expo/webpack-config

To help you get started, we’ve selected a few @expo/webpack-config 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 EvanBacon / Lego-Expo / webpack.config.js View on Github external
module.exports = async function(env, argv) {
  const mode = getMode(env);
  const isProd = mode === 'production';

  const config = await createExpoWebpackConfigAsync(
    {
      ...env,
      removeUnusedImportExports: false,
    },
    argv,
  );
  config.resolve.alias['three$'] = 'three/build/three.min.js';
  config.resolve.alias['three/.*$'] = 'three';

  config.plugins.push(
    new webpack.ProvidePlugin({
      THREE: 'three',
    }),