-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathplugins.js
More file actions
35 lines (34 loc) · 774 Bytes
/
plugins.js
File metadata and controls
35 lines (34 loc) · 774 Bytes
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
import { NODE_ENV } from "./config.js";
import { htmlPages, htmlProcessing } from "./plugins/html.js";
import { cssExtract, cssUnused, cssCritical } from "./plugins/css.js";
import {
spritesheet,
svgSprite,
convertImages,
// compression,
pwa,
} from "./plugins/assets.js";
import {
progress,
obsolete,
define,
banner,
analyze,
} from "./plugins/utils.js";
export default [
progress,
obsolete,
define,
...htmlPages,
htmlProcessing,
cssExtract,
NODE_ENV === "production" ? cssUnused : 0,
cssCritical,
svgSprite,
spritesheet,
convertImages,
NODE_ENV === "production" ? banner : 0,
// NODE_ENV === "production" ? compression : 0,
NODE_ENV === "production" ? analyze : 0,
NODE_ENV === "production" ? pwa : 0,
].filter(Boolean);