fix(autolink-windows): enable autolinking on Windows

* Reset Project to Single Package

* Update CI

* Resolve Conflicts

* Update Publisher Name
This commit is contained in:
Chiara Mooney 2021-04-26 08:40:20 -07:00 committed by GitHub
parent f36a5eb181
commit 9114b78d41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 20 deletions

View File

@ -46,4 +46,4 @@
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
</Package>
</Package>

View File

@ -3,10 +3,7 @@
* integration tests during local development or on CI services.
*/
const blacklist = require('metro-config/src/defaults/blacklist');
module.exports = {
resolver: {
blacklistRE: blacklist([/node_modules\/react-native-macos\/.*/])
},
};

View File

@ -6,7 +6,6 @@
*/
const fs = require('fs');
const path = require('path');
const blacklist = require('metro-config/src/defaults/blacklist');
const rnPath = fs.realpathSync(
path.resolve(require.resolve('react-native/package.json'), '..'),
@ -24,20 +23,6 @@ module.exports = {
},
// Include the macos platform in addition to the defaults because the fork includes macos, but doesn't declare it
platforms: ['ios', 'android', 'windesktop', 'windows', 'web', 'macos'],
// Since there are multiple copies of react-native, we need to ensure that metro only sees one of them
// This should go in RN 0.61 when haste is removed
blacklistRE: blacklist([
new RegExp(
`${(path.resolve(rnPath) + path.sep).replace(/[/\\]/g, '/')}.*`,
),
// This stops "react-native run-windows" from causing the metro server to crash if its already running
new RegExp(
`${path.resolve(__dirname, 'windows').replace(/[/\\]/g, '/')}.*`,
),
// Avoid error EBUSY: resource busy or locked, open '...\vnext\msbuild.ProjectImports.zip' when building 'vnext\Microsoft.ReactNative.sln' with '/bl'
/.*\.ProjectImports\.zip/,
]),
},
transformer: {
getTransformOptions: async () => ({

View File

@ -16,6 +16,7 @@
"start:ios": "react-native run-ios",
"start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos",
"start:windows": "react-native start --use-react-native-windows",
"run:windows": "react-native run-windows --root ./example --no-packager",
"ci": "CI=true && yarn lint",
"ci:publish": "yarn semantic-release",
"lint": "yarn tsc --noEmit && yarn eslint ./src --ext .ts,.tsx",

View File

@ -45,4 +45,23 @@ else {
},
},
};
}
}
module.exports.dependency = {
platforms: {
windows: {
sourceDir: 'windows',
solutionFile: 'ReactNativeWebView.sln',
projects: [
{
projectFile: 'ReactNativeWebView\\ReactNativeWebView.vcxproj',
directDependency: true,
},
{
projectFile: 'WebViewBridgeComponent\\WebViewBridgeComponent.vcxproj',
directDependency: false,
}
],
},
},
};