-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
35 lines (28 loc) · 895 Bytes
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
'use strict';
const build = require('@microsoft/sp-build-web');
build.addSuppression(/Warning - \[sass\] The local CSS class/gi);
build.addSuppression(/Warning - lint - /gi);
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.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.module.rules.push(
{
test: /\.js$/,
exclude: /node_modules\/(?!htmlparser2|micromark-util-decode-numeric-character-reference|micromark-util-sanitize-uri)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
);
return generatedConfiguration;
}
});
build.initialize(require('gulp'));