mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-06 07:06:11 +00:00
@@ -7,7 +7,12 @@ const pack = require('../package.json');
|
||||
|
||||
const root = path.resolve(__dirname, '..');
|
||||
|
||||
const modules = [...Object.keys(pack.peerDependencies)];
|
||||
const fs = require('fs');
|
||||
const rnwPath = fs.realpathSync(
|
||||
path.resolve(require.resolve('react-native-windows/package.json'), '..'),
|
||||
);
|
||||
|
||||
const modules = [...Object.keys(pack.peerDependencies), 'react-native-windows'];
|
||||
|
||||
module.exports = {
|
||||
projectRoot: __dirname,
|
||||
@@ -20,6 +25,15 @@ module.exports = {
|
||||
modules.map(
|
||||
m => new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`),
|
||||
),
|
||||
// This stops "react-native run-windows" from causing the metro server to
|
||||
// crash if its already running
|
||||
new RegExp(
|
||||
`${path.join(__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/,
|
||||
),
|
||||
|
||||
extraNodeModules: modules.reduce((acc, name) => {
|
||||
|
||||
Reference in New Issue
Block a user