Add DebugBundle/ReleaseBundle configurations to template app
Summary
Currently, if you create an app using the CLI, and you want this app to use an offline bundle (not using metro), you need to manually build and package the app code into a bundle, and add the bundle as a resource to your appx package. These steps aren't easy to figure out how to do and really need to be automated. The current version solved this by having DebugBundle/ReleaseBundle build configurations in the template app. We should do the same for vnext.
Motivation
Folks will want to share appx packages and publish them to the app store. Doing this needs to be as easy as possible. Having to manually build the bundle is creating unnecessary friction, we should have first class support for this in our tooling.
Basic example
Open Questions
I have one question for this. I added similar configurations to the App I am working on, but I ran into an issue that make using $(Configuration) variable problematic.
It's pretty common for the .targets files from nuget packages to use the $(Configuration) variable, and to assume that it will only ever be Debug or Release, this would cause headaches when using a configuration like 'DebugBundle' when the author of the nuget package assumed that only Release and Debug would be used.
I just wanted to ask if that's the approach you were planning to go with, and if you had any thoughts about this potential issue. (Or if you want to point out some basic misunderstanding I have.. happy to learn! 💯 )
For the app I'm working on we are using environment variables and checking their values in the project files to achieve this functionality. Environment variables can be checked in the project files using the same syntax $(variable), and adding scripts in project.json which set environment variables and then launch VS (or start building) has made it almost as convenient as having the options in the configuration drop-down.
@stecrain I haven't investigated this yet, but we already have this working in 'current' so a first step would be to see how it's done there.
Does anyone have a workaround? I'm trying to create a quick vNext app to test on a HoloLens, but I couldn't find instructions on how to build a standalone app, and I can't run the dev server on the HoloLens.
@orshir - we haven't gotten to this yet. @kmelmon is planning to begin investigations here shortly, we will have some updates soon.
V1 now done via https://github.com/microsoft/react-native-windows/pull/3367