Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
config.plugins.splice(plugin.index, 1, new HtmlWebpackPlugin(options));
config.plugins.splice(
plugin.index + 1,
0,
// Add variables to the `index.html`
// @ts-ignore
ExpoInterpolateHtmlPlugin.fromEnv(env, HtmlWebpackPlugin)
);
}
// Add support for expo-constants
// @ts-ignore: webpack version mismatch
config.plugins.push(ExpoDefinePlugin.fromEnv(env));
// Support platform extensions
config.resolve.extensions = getModuleFileExtensions('electron', 'web');
config.resolve.extensions.push('.node');
if (!options.skipEntry) {
if (!env.locations.appMain) {
throw new Error(
`The entry point for your project couldn't be found. Please install \`expo\`, or define it in the package.json main field`
);
}
const electronWebpackDefaultEntryPoints = [
path.resolve(env.projectRoot, 'index'),
path.resolve(env.projectRoot, 'app'),
];
const expoEntry = config.entry;
config.entry = async () => {
const entries = await resolveEntryAsync(expoEntry);
const resolvableExtensions = () => getModuleFileExtensions('web')