Passed
Push — master ( 50adea...d5902b )
by Amit
02:19
created

assets/build/webpack.config.optimize.js   A

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 30
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 0
nc 1
dl 0
loc 30
rs 10
c 1
b 0
f 0
wmc 0
mnd 0
bc 0
fnc 0
bpm 0
cpm 0
noi 1
1
'use strict'; // eslint-disable-line
2
3
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
4
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
5
const imageminMozjpeg = require('imagemin-mozjpeg');
6
const cssnano = require('cssnano');
7
8
const config = require('./config');
9
10
module.exports = {
11
  plugins: [
12
    new OptimizeCssAssetsPlugin({
13
      cssProcessor: cssnano,
14
      cssProcessorOptions: {
15
        discardComments: { removeAll: true },
16
        autoprefixer: {},
17
        safe: true,
18
      },
19
      canPrint: true,
20
    }),
21
    new ImageminPlugin({
0 ignored issues
show
Bug introduced by
The variable ImageminPlugin seems to be never declared. If this is a global, consider adding a /** global: ImageminPlugin */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
22
      optipng: { optimizationLevel: 7 },
23
      gifsicle: { optimizationLevel: 3 },
24
      pngquant: { quality: '65-90', speed: 4 },
25
      svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
26
      plugins: [imageminMozjpeg({ quality: 75 })],
27
      disable: (config.enabled.watcher),
28
    }),
29
  ],
30
};
31