diff --git a/change/react-native-windows-2020-06-11-17-03-06-master.json b/change/react-native-windows-2020-06-11-17-03-06-master.json new file mode 100644 index 00000000000..8b11b557ced --- /dev/null +++ b/change/react-native-windows-2020-06-11-17-03-06-master.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Fix file lock issue wiht msbuild /bl flag and the metro bundler", + "packageName": "react-native-windows", + "email": "dannyvv@microsoft.com", + "dependentChangeType": "patch", + "date": "2020-06-12T00:03:06.389Z" +} diff --git a/vnext/metro.config.js b/vnext/metro.config.js index 9ec73254b19..669f6038235 100644 --- a/vnext/metro.config.js +++ b/vnext/metro.config.js @@ -5,6 +5,7 @@ const fs = require('fs'); const path = require('path'); const rnwPath = __dirname; const {resolve} = require('metro-resolver'); +const blacklist = require('metro-config/src/defaults/blacklist'); function reactNativePlatformResolver(platformImplementations) { return (context, _realModuleName, platform, moduleName) => { @@ -49,6 +50,10 @@ module.exports = { // Redirect react-native-windows to this folder 'react-native-windows': rnwPath, }, + blacklistRE: blacklist([ + // Avoid error EBUSY: resource busy or locked, open '...\vnext\msbuild.ProjectImports.zip' when building 'vnext\Microsoft.ReactNative.sln' with '/bl' + /.*\.ProjectImports\.zip/, + ]), }, transformer: {