-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rn, ios): build fixes and metro-config updates (#14251)
feat(rn, ios): build fixes and metro-config updates
- Loading branch information
1 parent
9273022
commit cf1f97f
Showing
7 changed files
with
954 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export NODE_BINARY=$(command -v node) | ||
export ENTRY_FILE="${PROJECT_DIR}/../../index.ios.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
/* eslint-disable */ | ||
|
||
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); | ||
|
||
/** | ||
* Metro configuration for React Native | ||
* https://github.com/facebook/react-native | ||
* Metro configuration | ||
* https://reactnative.dev/docs/metro | ||
* | ||
* @format | ||
* @type {import('metro-config').MetroConfig} | ||
*/ | ||
|
||
const { getDefaultConfig } = require('metro-config'); | ||
|
||
module.exports = (async () => { | ||
const { | ||
resolver: { | ||
sourceExts, | ||
assetExts | ||
} | ||
} = await getDefaultConfig(); | ||
const { | ||
resolver: { | ||
sourceExts, | ||
assetExts | ||
} | ||
} = getDefaultConfig(); | ||
|
||
return { | ||
transformer: { | ||
babelTransformerPath: require.resolve('react-native-svg-transformer'), | ||
getTransformOptions: async () => ({ | ||
transform: { | ||
experimentalImportSupport: false, | ||
inlineRequires: true, | ||
}, | ||
}), | ||
}, | ||
resolver: { | ||
assetExts: assetExts.filter(ext => ext !== 'svg'), | ||
sourceExts: [...sourceExts, 'svg'] | ||
} | ||
const config = { | ||
transformer: { | ||
babelTransformerPath: require.resolve('react-native-svg-transformer') | ||
}, | ||
resolver: { | ||
assetExts: assetExts.filter(ext => ext !== 'svg'), | ||
sourceExts: [ ...sourceExts, 'svg' ] | ||
} | ||
})(); | ||
}; | ||
|
||
module.exports = mergeConfig(getDefaultConfig(__dirname), config); |
Oops, something went wrong.