Skip to content

Upgrading existing solution to evaluate SPFx 1.12.1 release candidate

Kevin Coughlin edited this page Apr 12, 2021 · 2 revisions

Notes on evaluating SPFx 1.12.1 release candidate

Upgrading an existing solution to evaluate SPFx 1.12.1 RC

  1. Modify the solution's SPFx package versions in package.json to latest 1.12.1-rc.x e.g. 1.12.1-rc.0.
  2. SPFx >= 1.12.0 requires Gulp@4 for Node 12 & 14 compatibility. Modify the solution's gulp version to 4.0.2.
  3. Run "npm install" or similar to install the new dependencies.
  4. Modify gulpfile.js to include a re-alias of "gulp serve". NOTE: non-RC @microsoft/generator-sharepoint does this during project scaffold.
const build = require('@microsoft/sp-build-web');

var getTasks = build.rig.getTasks;
build.rig.getTasks = function () {
  var result = getTasks.call(build.rig);

  result.set('serve', result.get('serve-deprecated'));

  return result;
};

Other notes

  • The dist/ folder can be cleaned using --clean CLI flag e.g. gulp bundle --clean.
Clone this wiki locally