Apr 26 2017 02:08 AM
Hi folks,
I'm currently developing a Client Side Web Part which is deployed automatically to a Office 365 CDN which is defined in the "write-manifest.json".
This works quite fine but in the long term I plan to use different environments with at least "Integration", "Quality Assurance" and "Production".
So I need at least three different "cdnBasePath" values which will be set (dynamically?) when the project is being packaged and bundled.
I have something like this in my mind:
Are there any best practices on how to handle such requirements?
Apr 26 2017 06:09 AM - edited Apr 26 2017 06:14 AM
There is a ship flag for the upload-to-sharepoint task but it doesn't do much at present. You could use this flag to control publication of your scripts to test or production using custom code until something better shows up. Elio Struyf has an example: https://github.com/estruyf/UploadToOffice365SPFx.
There is a similar issue for the target URLs for different environments. Wictor Wilen has written a node package that can fix this up: http://www.wictorwilen.se/how-to-generate-sharepoint-framework-bundles-for-multiple-tenants. You could use a similar approach.
As the SharePoint Framework matures I think this will get integrated into the tooling, probably using that ship flag to specify different target environments.