Skip to content

Commit

Permalink
fix metro config after rnw dep removal
Browse files Browse the repository at this point in the history
  • Loading branch information
radex committed Nov 22, 2024
1 parent 6ce1361 commit 70ef1df
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
const exclusionList = require('metro-config/src/defaults/exclusionList')
const fs = require('fs')
// const fs = require('fs')
const path = require('path')
const glob = require('glob-to-regexp')
const metroCache = require('metro-cache')

const rnwPath = fs.realpathSync(
path.resolve(require.resolve('react-native-windows/package.json'), '..'),
)
// const rnwPath = fs.realpathSync(
// path.resolve(require.resolve('react-native-windows/package.json'), '..'),
// )

const getBlockList = () => {
const defaultPattern = exclusionList([
Expand All @@ -19,9 +19,9 @@ const getBlockList = () => {
// TODO: Shouldn't it be native/windowsTest?
new RegExp(`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`),
// This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild
new RegExp(`${rnwPath}/build/.*`),
new RegExp(`${rnwPath}/target/.*`),
/.*\.ProjectImports\.zip/,
// new RegExp(`${rnwPath}/build/.*`),
// new RegExp(`${rnwPath}/target/.*`),
// /.*\.ProjectImports\.zip/,
])
.toString()
.slice(1, -1)
Expand Down

0 comments on commit 70ef1df

Please sign in to comment.