You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This seems to work for me. (My first attempt at translating the webpack instructions to metro without being very familiar with either!)
create metro.config.js in the root of the project. And add the
// Learn more https://docs.expo.io/guides/customizing-metroconst{ getDefaultConfig }=require('expo/metro-config');/** @type {import('expo/metro-config').MetroConfig} */constconfig=getDefaultConfig(__dirname);constALIASES={'react-native': 'react-native-web','react-native-webview': '@10play/react-native-web-webview'};/** * This maps moduleName: string -> newmoduleName: string given co * @param {T} context * @param {string} moduleName * @param {string} platform in {"web", ... } * @returns */config.resolver.resolveRequest=(context,moduleName,platform)=>{// Ensure you call the default resolver.if(platform==='web'){returncontext.resolveRequest(context,// Use an alias if one exists.ALIASES[moduleName]??moduleName,platform);}returncontext.resolveRequest(context,moduleName,platform);};module.exports=config;
Documentation: expo SDK 51 does not seem to support webpack. It looks like migration to metro is required.
The text was updated successfully, but these errors were encountered: