forked from futurepress/react-native-static-server
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#123] v0.18.0: WIP: Upgrade to [email protected] / Android
- Loading branch information
1 parent
e34891f
commit 941282f
Showing
18 changed files
with
1,529 additions
and
1,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v20.17.0 | ||
v20.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
ReactNativeStaticServer_kotlinVersion=1.7.0 | ||
ReactNativeStaticServer_minSdkVersion=28 | ||
ReactNativeStaticServer_targetSdkVersion=31 | ||
ReactNativeStaticServer_compileSdkVersion=31 | ||
ReactNativeStaticServer_ndkversion=21.4.7075529 | ||
ReactNativeStaticServer_kotlinVersion=1.9.24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
example/ios/ReactNativeStaticServerExample.xcworkspace/contents.xcworkspacedata
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
example/ios/ReactNativeStaticServerExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,18 @@ | ||
const {getDefaultConfig, mergeConfig} = require('@react-native/metro-config'); | ||
|
||
const fs = require('fs'); | ||
const path = require('path'); | ||
const escape = require('escape-string-regexp'); | ||
const exclusionList = require('metro-config/src/defaults/exclusionList'); | ||
const pak = require('../package.json'); | ||
const { getDefaultConfig } = require('@react-native/metro-config'); | ||
const { getConfig } = require('react-native-builder-bob/metro-config'); | ||
const pkg = require('../package.json'); | ||
|
||
const root = path.resolve(__dirname, '..'); | ||
|
||
const modules = Object.keys({ | ||
...pak.peerDependencies, | ||
}); | ||
|
||
const rnwPath = fs.realpathSync( | ||
path.resolve(require.resolve('react-native-windows/package.json'), '..'), | ||
); | ||
|
||
/** | ||
* Metro configuration | ||
* https://facebook.github.io/metro/docs/configuration | ||
* | ||
* @type {import('metro-config').MetroConfig} | ||
*/ | ||
|
||
const config = { | ||
watchFolders: [root], | ||
resolver: { | ||
blockList: exclusionList([ | ||
// We need to make sure that only one version is loaded for peerDependencies | ||
// So we block them at the root, and alias them to the versions in example's node_modules | ||
...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.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/, | ||
]), | ||
extraNodeModules: modules.reduce((acc, name) => { | ||
acc[name] = path.join(__dirname, 'node_modules', name); | ||
return acc; | ||
}, {}), | ||
}, | ||
transformer: { | ||
getTransformOptions: async () => ({ | ||
transform: { | ||
experimentalImportSupport: false, | ||
inlineRequires: true, | ||
}, | ||
}), | ||
// This fixes the 'missing-asset-registry-path` error (see https://github.com/microsoft/react-native-windows/issues/11437) | ||
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry', | ||
}, | ||
}; | ||
|
||
module.exports = mergeConfig(getDefaultConfig(__dirname), config); | ||
module.exports = getConfig(getDefaultConfig(__dirname), { | ||
root, | ||
pkg, | ||
project: __dirname, | ||
}); |
Oops, something went wrong.