I am building SharePoint Online Web Parts with ReactJS and the apps are stored in the SPO Store as Apps. I obviously have to upload and currently doing it via VS Code and the gulp commands. This is starting to be painstaking long and was wondering how can speed up the Dev pipeline esp on commands like gulp upload-to-sharepoint --ship or gulp upload-app--pkg?

My js files (bundled files)can take anywhere between 10mins to 25mins to upload.

My current enviro is as so:

 - SPO
 - SPO Web Parts
 - VS Code

Dev architecture:

 - ReactJS 15 
 - Gulp - build tool

I have PowerShell too if that can help.

Eventually I will be doing automated builds and deploy with help of VSTS and aim to automate the whole process but that will be wack if upload times are still the same!

UPDATE: Just tried this here: https://www.spdavid.com/use-gulp-and-npm-to-automate-2/ but the 'gulp default' command runs then ends and cursor back to showing root i.e. C:/blahbla/blah> and not in process. In his screenshot he's running just 'gulp' and this doesn't work either. I don't know if this will speed up the process at all though, even if it worked.

'# DevWebOpsProblems - :-|

  • What I don't understand here is how can a webpart JS file be that big to take over 10 minutes to upload... Also, as far as I remember, as long as you don't use the "--ship" parameter you don't need to reupload the app package again. – Ciamas May 15 '18 at 12:39
  • I understand too. JS files even the largest are 1 or 2mb. I have many which get uploaded and that's why I mentioned it's 'files' and not a single 'file'. I've noticed I have to re-upload the app package since it's repackaged again or the app won't update. I'll try it without the --ship when doing the gulp upload-app-pkg --ship cmd. But it's the upload-to-sharepoint that takes the longest. – j03doeson May 17 '18 at 14:16
  • Specifically the actual files that are uploaded live in the folder: C:Projectz\myproject\src\webparts\User Web Parts\temp\deploy and again if it doesn't upload them - all of them - then again the app's changes do not take effect. – j03doeson May 17 '18 at 14:17

To be clear, it looks like you're not doing SharePoint Framework "Web Parts" but doing the classic Script Injection model.

That SPDavid blog post is just running gulp-spsave which is just about the best way I know of to upload to SharePoint. You're probably not configuring it correctly - check out the documentation to figure out what you're doing wrong.


You might also want to throw some console.logs into your gulp task and read up on gulp itself to make sure you've got it set up properly.

But it sounds like your bigger problem is the upload times, and shoring up your dev process is not likely to fix that.

  • Actually I am doing SharePoint Framework "Web Parts" with ReactJS! ;-). Old way (script injection) model uses pure JavaScript and I am using not using that, I am using ReactJS Javascript (ES6, JSX etc.). Also I don't think it's a config issue..maybe I am uploading too many files at once but since they're JS based files even all of them put together are not over 500mb in size. I beg to differ since I believe that better upload times would actually improve dev pipe, or at least feel like so. I am open to choices of fixing this whether it be via .PS or move resources to Azure or a mixture. – j03doeson May 15 '18 at 12:26
  • If you're doing spfx then why are you uploading files to SharePoint? It seems like you're doing it wrong. Uploading 500MB of stuff to SharePoint? – Derek Gusoff May 15 '18 at 13:25
  • Sorry I think that I was confusing. I mean even if you have lots of js files it's rare to see them over 500mb no matter how many there are. And I am doing spfx but isn't spfx developed locally in Visual Studio Code using the tech stack I've already mentioned? I still think you think I am using old script style web parts - with editor and injection model, I am not. Definitely not :-) and I am building custom web parts . So nothing out of the box – j03doeson May 17 '18 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.