Skip to content

Commit

Permalink
fix: added sb config in metro.config.js.ejs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyd1997 authored Dec 6, 2023
1 parent 051de88 commit ff330f4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions generators/app/templates/metro.config.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const config = getDefaultConfig(__dirname, {
isCSSEnabled: true,
});

config.resolver.resolverMainFields = ['sbmodern', ...config.resolver.resolverMainFields];

config.resolver.sourceExts = process.env.RN_SRC_EXT
? [...process.env.RN_SRC_EXT.split(',').concat(config.resolver.sourceExts), 'mjs']
: [...config.resolver.sourceExts, 'mjs'];
Expand Down

0 comments on commit ff330f4

Please sign in to comment.