Un progetto SPFx in Visual Studio Code vengono generate delle notifiche toast ad ogni errore o compilazione.
Queste notifiche continue possono risultare un po' fastidiose.

E' possibile disabilitarle aggiungendo, nel file gulpfile.js, il seguente codice
JavaScript: disabilita notifiche toast
build.mergeConfig({
  showToast: false
});
questo è il file completo
JavaScript
'use strict';

const build = require('@microsoft/sp-build-web');

build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);

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

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

  return result;
};

// disabilita notifiche toast
build.mergeConfig({
  showToast: false
});

build.initialize(require('gulp'));
Potrebbe interessarti anche: