How to use the @expo/webpack-config/utils.resolveEntryAsync 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 expo / expo-cli / packages / electron-adapter / src / Webpack.ts View on Github external
config.entry = async () => {
      const entries = await resolveEntryAsync(expoEntry);

      const expoEntryPointPath = env.locations.appMain;

      if (entries.renderer && !entries.renderer.includes(expoEntryPointPath)) {
        if (!Array.isArray(entries.renderer)) {
          entries.renderer = [entries.renderer];
        }

        entries.renderer = entries.renderer.filter(
          inputPath =>
            !electronWebpackDefaultEntryPoints.some(possibleEntryPoint =>
              inputPath.includes(possibleEntryPoint)
            )
        );

        entries.renderer.push(expoEntryPointPath);