From abfe9dbc306357428ec3cf5bf83a50018662ce89 Mon Sep 17 00:00:00 2001 From: Emily Xiong Date: Tue, 8 Mar 2022 12:32:45 -0500 Subject: [PATCH] bugfix(react-native): ignore dist folder in metro config (#9214) --- .../generators/application/files/app/metro.config.js.template | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native/src/generators/application/files/app/metro.config.js.template b/packages/react-native/src/generators/application/files/app/metro.config.js.template index 8152cd68bcb04..b28bb9301d7a7 100644 --- a/packages/react-native/src/generators/application/files/app/metro.config.js.template +++ b/packages/react-native/src/generators/application/files/app/metro.config.js.template @@ -1,5 +1,6 @@ const { withNxMetro } = require('@nrwl/react-native'); const { getDefaultConfig } = require('metro-config'); +const exclusionList = require('metro-config/src/defaults/exclusionList'); module.exports = (async () => { const { @@ -20,6 +21,7 @@ module.exports = (async () => { assetExts: assetExts.filter((ext) => ext !== 'svg'), sourceExts: [...sourceExts, 'svg'], resolverMainFields: ['sbmodern', 'browser', 'main'], + blacklistRE: exclusionList([/\.\/dist\/.*/]), }, }, {