Skip to content

Commit

Permalink
fix: invisibility of stack header back icon
Browse files Browse the repository at this point in the history
  • Loading branch information
UNIDY2002 committed Sep 25, 2023
1 parent 76aa343 commit 67f1c10
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions apps/thu-info-app/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ const config = {
],
disableHierarchicalLookup: true,
},
server: {
enhanceMiddleware: (middleware) => {
return (req, res, next) => {
// When an asset is imported outside the project root, it has wrong path on Android
// So we fix the path to correct one
if (/\/assets\/.+\.png\?.+$/.test(req.url)) {
req.url = `/assets/../..${req.url}`;
}

return middleware(req, res, next);
};
},
},
};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);

0 comments on commit 67f1c10

Please sign in to comment.