when i get up my local server with the command(gulp serve), instead the show in the browser my first web part it create a files.
1 Answer
In order work it properly make sure gulpfile.js contain the proper code.
- gulpfile.js should contain following code.
'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;
};
build.initialize(require('gulp'));
- package.json file should contain following script.
"scripts": {
"build": "gulp bundle",
"clean": "gulp clean",
"test": "gulp test"
},