Skip to content

Commit f858dad

Browse files
author
C. M. Barth
authored
enable fast refresh for UWP scenarios (#174)
1 parent b5272ea commit f858dad

File tree

9 files changed

+283
-15605
lines changed

9 files changed

+283
-15605
lines changed

Apps/PackageTest/0.64.0-rc.0/package-lock.json

+261-15,582
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/PackageTest/0.64.0-rc.0/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"react": "^17.0.1",
1919
"react-native": "^0.64.0-rc.0",
2020
"react-native-permissions": "^3.0.0",
21-
"react-native-windows": "^0.64.0-0"
21+
"react-native-windows": "^0.64.0-preview.15"
2222
},
2323
"devDependencies": {
2424
"@babel/core": "^7.8.4",

Apps/PackageTest/0.64.0-rc.0/windows/PackageTest/App.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ App::App() noexcept
2525
InstanceSettings().UseWebDebugger(false);
2626
InstanceSettings().UseFastRefresh(false);
2727
#else
28-
JavaScriptBundleFile(L"index");
29-
InstanceSettings().UseWebDebugger(true);
28+
JavaScriptMainModuleName(L"index");
29+
InstanceSettings().UseWebDebugger(false); // BabylonReactNative accesses the jsi runtime, which isn't possible with the web debugger
3030
InstanceSettings().UseFastRefresh(true);
31+
InstanceSettings().SourceBundleHost(L"localhost"); // Update to PC ip address when running on remote machines
3132
#endif
3233

3334
#if _DEBUG

Apps/PackageTest/0.64.0-rc.0/windows/PackageTest/PackageTest.vcxproj

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
</PropertyGroup>
2323
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2424
<PropertyGroup Label="ReactNativeWindowsProps">
25-
<UseBundle>true</UseBundle>
2625
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
2726
</PropertyGroup>
2827
<ItemGroup Label="ProjectConfigurations">

Apps/Playground/package-lock.json

+14-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Apps/Playground/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"react": "^17.0.1",
2222
"react-native": "^0.64.0-rc.0",
2323
"react-native-permissions": "^3.0.0",
24-
"react-native-windows": "^0.64.0-0"
24+
"react-native-windows": "^0.64.0-preview.15"
2525
},
2626
"devDependencies": {
2727
"@babel/core": "^7.12.9",

Apps/Playground/windows/Playground/App.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ using namespace Windows::ApplicationModel;
2525
App::App() noexcept
2626
{
2727
#if BUNDLE
28-
// Note: add <UseBundle>true</UseBundle> property to application's ReactNativeWindowsProps PropertyGroup to force BUNDLE to true
2928
JavaScriptBundleFile(L"index.windows");
3029
InstanceSettings().UseWebDebugger(false);
3130
InstanceSettings().UseFastRefresh(false);
3231
#else
3332
JavaScriptMainModuleName(L"index");
34-
InstanceSettings().UseWebDebugger(true);
33+
InstanceSettings().UseWebDebugger(false); // BabylonReactNative accesses the jsi runtime, which isn't possible with the web debugger
3534
InstanceSettings().UseFastRefresh(true);
35+
InstanceSettings().SourceBundleHost(L"localhost"); // Update to PC ip address when running on remote machines
3636
#endif
3737

3838
#if _DEBUG

Apps/Playground/windows/Playground/Playground.vcxproj

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
</PropertyGroup>
2222
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
2323
<PropertyGroup Label="ReactNativeWindowsProps">
24-
<UseBundle>true</UseBundle>
2524
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
2625
</PropertyGroup>
2726
<ItemGroup Label="ProjectConfigurations">

Modules/@babylonjs/react-native-windows/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"react": "^17.0.1",
3030
"react-native": "^0.64.0-rc.0",
3131
"react-native-permissions": "^3.0.0",
32-
"react-native-windows": "^0.64.0-0"
32+
"react-native-windows": "^0.64.0-preview.15"
3333
},
3434
"devDependencies": {
3535
"@babel/core": "^7.8.4",

0 commit comments

Comments
 (0)