spfx-pkgdeploy
Set up your gulpfile.js
like this:
'use strict'; const gulp = ;const spfxPkgDeploy = default;const build = ;const packageSolution = ;build; ; build;
Then add a new task to your package.json
called deploy
:
gulp clean && gulp default --ship && gulp deleteAppPkg --ship && gulp package-solution --ship && gulp uploadAppPkg --ship && gulp deploySppkg --ship
Like this:
NOTE: The reason deleteAppPkg
is included in the npm deploy
script is that we've experienced some issues with upgrading an app package without removing the app package file first.