File size: 592 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Originated from https://github.com/Timer/cssnano-preset-simple/blob/master/src/index.js

/**
 * We will not try to override "postcss-svgo" here. Instead we will alias "postcss-svgo" to a stub
 * plugin (located at "next/dist/compiled/postcss-plugin-stub-for-cssnano-simple") during pre-compilation
 */

module.exports = function (opts = {}) {
  const options = Object.assign(
    {},
    { cssDeclarationSorter: { exclude: true }, calc: { exclude: true } },
    opts
  )
  // eslint-disable-next-line import/no-extraneous-dependencies
  return require('cssnano-preset-default')(options)
}