-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
34 lines (30 loc) · 1006 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
'use strict';
const build = require('@microsoft/sp-build-web');
const { IgnorePlugin } = require('webpack');
build.addSuppression(`Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.`);
const postCssLoader = {
loader: "postcss-loader",
options: {
plugins: () => [
// https://github.com/ai/browserslist
require("autoprefixer")()
]
}
};
build.configureWebpack.mergeConfig({
additionalConfiguration: (generatedConfiguration) => {
generatedConfiguration.module.rules.push(
{
test: /\.s?css$/,
use: [postCssLoader, {loader:'sass-loader'}]
}
);
generatedConfiguration.plugins.push(
new IgnorePlugin({
resourceRegExp: /moment$/, // Moment is optionally included by Pikaday, but is not needed in our bundle
})
);
return generatedConfiguration;
}
});
build.initialize(require('gulp'));