fix(example): update metro config (#3291)

This commit is contained in:
Krzysztof Moch 2023-10-12 10:36:15 +02:00 committed by GitHub
parent 5c3baca1d8
commit 45dcded576
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,15 @@
*/ */
const path = require('path'); const path = require('path');
const blacklist = require('metro-config/src/defaults/exclusionList'); const blacklist = require('metro-config/src/defaults/exclusionList');
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config');
module.exports = { /**
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
*/
const config = {
resolver: { resolver: {
blacklistRE: blacklist([ blacklistRE: blacklist([
// This stops "react-native run-windows" from causing the metro server to crash if its already running // This stops "react-native run-windows" from causing the metro server to crash if its already running
@ -19,12 +26,6 @@ module.exports = {
/(.*\/react-native-video\/node_modules\/.*)$/, /(.*\/react-native-video\/node_modules\/.*)$/,
]), ]),
}, },
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
}; };
module.exports = mergeConfig(getDefaultConfig(__dirname), config);