Skip to content

Commit

Permalink
remove parser module alias
Browse files Browse the repository at this point in the history
  • Loading branch information
achou11 committed Aug 7, 2024
1 parent b0beb45 commit 89e1aa6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
const {getSentryExpoConfig} = require('@sentry/react-native/metro');

const NO_ICU_PARSER_MODULE_PATH = require.resolve(
'@formatjs/icu-messageformat-parser/no-parser',
);

/** @type {import('expo/metro-config').MetroConfig} */
const config = getSentryExpoConfig(__dirname);
const defaultBlockList = Array.isArray(config.resolver.blockList)
Expand All @@ -20,13 +16,6 @@ module.exports = {
},
resolver: {
...config.resolver,
resolveRequest: (context, moduleName, platform) => {
// https://formatjs.io/docs/guides/advanced-usage#react-intl-without-parser-40-smaller
if (moduleName.startsWith('@formatjs/icu-messageformat-parser')) {
return {filePath: NO_ICU_PARSER_MODULE_PATH, type: 'sourceFile'};
}
return context.resolveRequest(context, moduleName, platform);
},
// For nodejs-mobile
blockList: [...defaultBlockList, /nodejs-assets\/.*/],
// For https://github.com/kristerkari/react-native-svg-transformer
Expand Down

0 comments on commit 89e1aa6

Please sign in to comment.