react-native-website icon indicating copy to clipboard operation
react-native-website copied to clipboard

WIP: Migrate inline requires + RAM bundles docs to new "optimizing JS code loading" guide

Open motiz88 opened this issue 11 months ago • 1 comments

WIP rewrite of ram-bundles-inline-requires.md as a new guide to optimizing JavaScript code loading. This is a followup from https://github.com/expo/expo/issues/27279#issuecomment-1971610698. Opening this draft PR for early input.

motiz88 avatar Mar 01 '24 14:03 motiz88

Deploy Preview for react-native ready!

Name Link
Latest commit 643e0e68da9aa911fac1c8b5f1c4970574eecec5
Latest deploy log https://app.netlify.com/sites/react-native/deploys/65e76afa6b7bb50008c403c7
Deploy Preview https://deploy-preview-4030--react-native.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 01 '24 14:03 netlify[bot]

cc @blakef since you're touching a similar area

cortinico avatar Mar 05 '24 12:03 cortinico

@motiz88 and I spoke offline, the feature has now been remove from the CLI. These docs will make it easier to remove any mention of RAM bundles . I'll follow once this lands.

blakef avatar Mar 05 '24 13:03 blakef

@blakef Should we just remove RAM bundles from the page in this PR? Or is there a plan to keep some "how to RAM bundle" docs around as part of React Native?

motiz88 avatar Mar 05 '24 16:03 motiz88

@motiz88 if you're happy to strip RAM bundles out in this PR, please do.

blakef avatar Mar 05 '24 16:03 blakef

Hmm, one reason not to remove all mention of RAM bundles is that it would break existing links from the Metro docs. https://metrobundler.dev/docs/configuration#gettransformoptions

image

motiz88 avatar Mar 05 '24 16:03 motiz88

cc @robhogan for awareness of the RAM bundles discussion and implications on Metro's docs

motiz88 avatar Mar 05 '24 16:03 motiz88

it would break existing links from the Metro docs

@lunaleaps was working on adding redirects on our docusaurus instance as we're facing something similar with the New Architecture docs. I think we'll be find having a landing page for those broken links and we can fully remove the docs related to ram-bundles

cortinico avatar Mar 05 '24 16:03 cortinico

Discussed with @blakef further online. Assuming the RAM bundle feature isn't going away in 0.74, it makes sense to land this PR with RAM bundle docs and then follow up (across RN and Metro's docs) after the RN docs for 0.74 are cut.

motiz88 avatar Mar 05 '24 18:03 motiz88