A developer has finished a React code app that was initialized with pa app init and wants to publish its first version to the environment. Which sequence is correct?
Select an answer to reveal the explanation.
Short Explanation
Think of it like baking before delivery: you build the bundle first, then hand the finished cake to pa app push. The push publishes what's already compiled; it doesn't cook anything for you. And pa app run is your local test kitchen, not the delivery van.
Full Explanation
A code app is compiled locally like any single-page application, and the Power Apps CLI publishes the compiled output. The build step, typically npm run build in a Vite or similar project, writes the bundled assets to the build path recorded in the app's configuration. pa app push then takes that compiled app and publishes a new version in the Power Platform environment, where it can be shared and played, and can place it in a solution. Running push before build either publishes stale output or fails, because the host does not compile TypeScript source; it serves compiled assets. pa app run starts the Power Apps local host for development and never publishes anything, regardless of how the browser session ends. Zipping source and importing it as a solution is not a supported packaging format, and environments do not build code app source. Exam caveat: after changing app settings such as header visibility with pa app set-setting, a new push is required for them to take effect. Operational check: confirm the build output folder contains the latest bundle and index file, run pa app push, and verify the new version opens from the play URL the CLI reports.