Forum Discussion
SharePoint Framework SPFX multiple app versions
Hi
I am developing a SPFX app to work with SP Online. I can deploy the app and point to the code hosted on Azure CDN, how can I deploy the same app that can point to code running locally ? the goal is to deploy a staging version that can be shown to others while keep developing the local version. I know that I can do that with workbench, but the workbench page doesn't have our branding layout that can show the app the way we want.
I tried to changed the package name or id, it did deployed two versions of app to the App store, but they are not working properly.
Thanks
AFAIK, yes.
We need the ID to be different, so that you can upload 2 pkg files. The package files will point at the code in the CDN.
An alternative could be to have two tenant and/or two CDNs.
5 Replies
Hi Man Cheng,
You could probably do the following:
In package-solution there is an id that makes the web part unique. So you could change this ID before deploying the app to your CDN for the second time and then upload the different pgk file to your app store.
You would probably also need to update the container in teh deploy-azure-storage.json so that you keep the app in a different container within Azure. Note that you will need to creeate this staging container in Azure as well.
then finally update the cdnBasePath in write-manifests.json.
- Man ChengCopper Contributor
Thanks for the reply
I tried to change ID, that didn't work
what I want to do is create 2 versions
1. development,
code running locally, test on a page where app web part is installed, (not workbench page)
2. staging/production
code retrieved from Azure, app runs on a page where app web part is installed.
so I will need to have two versions of app uploaded to the App store, one with cdnpath points to Auzre,
Did you try with two containers as mentioned earlier?