Skip to content

Commit

Permalink
fix(example): update metro config (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
KrzysztofMoch authored Oct 12, 2023
1 parent 5c3baca commit 45dcded
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions examples/basic/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@
*/
const path = require('path');
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: {
blacklistRE: blacklist([
// This stops "react-native run-windows" from causing the metro server to crash if its already running
Expand All @@ -19,12 +26,6 @@ module.exports = {
/(.*\/react-native-video\/node_modules\/.*)$/,
]),
},
transformer: {
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
inlineRequires: true,
},
}),
},
};

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

0 comments on commit 45dcded

Please sign in to comment.