microsoft / microsoft/react-native-windows

The new arch app template should make it easy and clear to choose where the bundle comes from

Open
#12,619 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: App Template Area: Bundle enhancement Workstream: Developer Experience
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

Summary

Bundles can be loaded from anywhere, but "built-in" we offer loading from:

  1. Metro (typically only in debug)
  2. An asset in an appx (via ms-appx://, default for UWP)
  3. A string resource in an assembly (via resource://mylib.dll/)
  4. A file on disk (via file://, default for Win32)

While obviously apps are on their own for code-push scenarios (our template won't hook you up with any of that), we really should make it both clearer what the default is in our template, but also easier for app developers to switch to meet their needs

Motivation

After getting the #12569 alerts for dynamically loading libraries for their resources, I wanted to see where (if anywhere) we were actually using this in our templates or examples. I think we should be lot clearer about the options and their trade-offs.

Basic Example

I can imagine scenarios where developers want to store their JS bundle in their dll, mildly obfuscating some of their code or reducing the number of files they ship.

I can also imagine scenarios where developers don't want their JS bundle in their dll because that means you have to re-build and re-deploy the native code to get JS updates.

I can imagine scenarios where you want the benefits of both at different times for different reasons.

Open Questions

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the new architecture app template and its bundle-loading configuration. Review how the template currently selects Metro, appx, resource, or file sources; done should make the default explicit and provide clear, easy-to-change guidance for choosing another source.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.