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
I added a custom resolveRequest block in metro.config.js in an Nx-generated expo app, but it is not being called. See steps to reproduce below
Expected Behavior
That my custom resolveRequest function will be run
GitHub Repo
No response
Steps to Reproduce
Generate an Expo app in an Nx workspace (e.g. npx create-nx-workspace@latest --preset=expo --appName=tempNxExpoApp, then npm install)
Add a custom resolverRequest block in metro.config.js
const customConfig = {
..
resolver: {
// existing lines from nx-generated app
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'cjs', 'mjs', 'svg'],
// add this
resolveRequest: (contextX, moduleNameX, platformX) => {
// custom alias replacement logic supposed to go here, but for now we just want to know if this block is called.
// also add a breakpoint here
console.log(`============ RUNNING CUSTOM RESOLVEREQUEST ============`);
// call default resolveRequest:
return contextX.resolveRequest(
contextX,
moduleNameX,
platformX
);
},
},
};
Add a breakpoint in node_modules/@expo/cli/build/src/start/server/metro/withMetroResolvers.js, the following lines:
Current Behavior
I added a custom
resolveRequest
block in metro.config.js in an Nx-generated expo app, but it is not being called. See steps to reproduce belowExpected Behavior
That my custom resolveRequest function will be run
GitHub Repo
No response
Steps to Reproduce
npx create-nx-workspace@latest --preset=expo --appName=tempNxExpoApp
, thennpm install
)node_modules/@expo/cli/build/src/start/server/metro/withMetroResolvers.js
, the following lines:debug line
loop
start
task) with debug enabled (EXPO_DEBUG=true
)Expectation:
Actual:
resolvers
list contains 7 items, none of which is my custom resolver function (with the X suffix in the arg names)Nx Report
Failure Logs
Package Manager Version
10.9.2
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: