Repository navigation
Conversation
In `react-native-windows`, we are able to overwrite React modules, but unfortunately there is not any good way of overwriting packager modules. I'm trying to implement support for `unbundle` in `react-native-windows`, but unfortunately this file limits assets-based unbundles to the Android platform only. This change will allow platforms other than Android to use unbundles, while still disabling assets unbundles for iOS.
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
|
Seems reasonable, @facebook-github-bot shipit |
|
@janicduplessis has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
|
@mkonicek has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
|
Sorry about the long delay on this! Just found this PR by reading the Core Contributors group on fb. Merging. |
|
I tried to merge this pull request into the Facebook internal repo but some checks failed. To unblock yourself please check the following: Does this pull request pass all open source tests on GitHub? If not please fix those. Does the code still apply cleanly on top of GitHub master? If not can please rebase. In all other cases this means some internal test failed, for example a part of a fb app won't work with this pull request. I've added the Import Failed label to this pull request so it is easy for someone at fb to find the pull request and check what failed. If you don't see anyone comment in a few days feel free to comment mentioning one of the core contributors to the project so they get a notification. |
|
Based on the discussion in the fb core contributors group this is not needed anymore. Please ping me on Slack or fb if we should merge this. I'll close it for now. |
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes microsoft#952
Adds unbundle support by adding a check in ChakraJavaScriptExecutor for the UNBUNDLE magic file, and by adding a `nativeRequire` hook to the Chakra runtime to dynamically load files when needed. The intent is that this should reduce app start times by reducing the amount of JavaScript that needs to be initially processed, but it doesn't seem to have much effect on the simple Playground and UIExplorer apps I've tested it on. Remaining TODO: add unbundle support to NativeJavaScriptExecutor Depends on react/react-native#12423 Fixes #952
In
react-native-windows, we are able to overwrite React modules, but unfortunately there is not any good way of overwriting packager modules. I'm trying to implement support forunbundleinreact-native-windows, but unfortunately this file limits assets-based unbundles to the Android platform only. This change will allow platforms other than Android to use unbundles, while still disabling assets unbundles for iOS.Thanks for submitting a pull request! Please provide enough information so that others can review your pull request:
Explain the motivation for making this change. What existing problem does the pull request solve?
Prefer small pull requests. These are much easier to review and more likely to get merged. Make sure the PR does only one thing, otherwise please split it.
Test plan (required)
Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.
Make sure tests pass on both Travis and Circle CI.
Code formatting
Look around. Match the style of the rest of the codebase. See also the simple style guide.
For more info, see the "Pull Requests" section of our "Contributing" guidelines.