Files
sage/resources/assets/build/webpack.config.optimize.js
Ben c21df9965f Update Autoprefixer and standardize browserlist location (#1899)
This updates Autoprefixer to 7.1.1, and also moves the browser target
list to package.json, in line with the recommendation made in this
article (https://evilmartians.com/chronicles/autoprefixer-7-browserslist-2-released)
from the developers of Autoprefixer and Browserslist.
2017-05-31 13:09:00 -07:00

30 lines
884 B
JavaScript

'use strict'; // eslint-disable-line
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const { default: ImageminPlugin } = require('imagemin-webpack-plugin');
const imageminMozjpeg = require('imagemin-mozjpeg');
const cssnano = require('cssnano');
const config = require('./config');
module.exports = {
plugins: [
new OptimizeCssAssetsPlugin({
cssProcessor: cssnano,
cssProcessorOptions: {
discardComments: { removeAll: true },
autoprefixer: {},
},
canPrint: true,
}),
new ImageminPlugin({
optipng: { optimizationLevel: 7 },
gifsicle: { optimizationLevel: 3 },
pngquant: { quality: '65-90', speed: 4 },
svgo: { removeUnknownsAndDefaults: false, cleanupIDs: false },
plugins: [imageminMozjpeg({ quality: 75 })],
disable: (config.enabled.watcher),
}),
],
};