|
4 | 4 | * |
5 | 5 | * @format |
6 | 6 | */ |
7 | | -// const fs = require('fs'); |
8 | | -// const path = require('path'); |
9 | | -// const exclusionList = require('metro-config/src/defaults/exclusionList'); |
| 7 | +const fs = require('fs'); |
| 8 | +const path = require('path'); |
| 9 | +const exclusionList = require('metro-config/src/defaults/exclusionList'); |
10 | 10 |
|
11 | | -// const rnwPath = fs.realpathSync( |
12 | | -// path.resolve(require.resolve('react-native-windows/package.json'), '..'), |
13 | | -// ); |
| 11 | +const rnwPath = fs.realpathSync( |
| 12 | + path.resolve(require.resolve('react-native-windows/package.json'), '..'), |
| 13 | +); |
14 | 14 |
|
15 | 15 | module.exports = { |
16 | | - // Disabled until Windows Example app is added with v0.70 |
17 | | - // resolver: { |
18 | | - // blockList: exclusionList([ |
19 | | - // // This stops "react-native run-windows" from causing the metro server to crash if its already running |
20 | | - // new RegExp( |
21 | | - // `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, |
22 | | - // ), |
23 | | - // // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild |
24 | | - // new RegExp(`${rnwPath}/build/.*`), |
25 | | - // new RegExp(`${rnwPath}/target/.*`), |
26 | | - // /.*\.ProjectImports\.zip/, |
27 | | - // ]), |
28 | | - // }, |
| 16 | + resolver: { |
| 17 | + blockList: exclusionList([ |
| 18 | + // This stops "react-native run-windows" from causing the metro server to crash if its already running |
| 19 | + new RegExp( |
| 20 | + `${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`, |
| 21 | + ), |
| 22 | + // This prevents "react-native run-windows" from hitting: EBUSY: resource busy or locked, open msbuild.ProjectImports.zip or other files produced by msbuild |
| 23 | + new RegExp(`${rnwPath}/build/.*`), |
| 24 | + new RegExp(`${rnwPath}/target/.*`), |
| 25 | + /.*\.ProjectImports\.zip/, |
| 26 | + ]), |
| 27 | + }, |
29 | 28 | transformer: { |
30 | 29 | getTransformOptions: async () => ({ |
31 | 30 | transform: { |
|
0 commit comments