How to use cssnano-simple - 1 common examples

To help you get started, we’ve selected a few cssnano-simple examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zeit / next.js / packages / next / build / webpack / plugins / css-minimizer-plugin.ts View on Github external
to: file,
                  from: file,
                }

                const asset = compilation.assets[file]

                let input: string
                if (postcssOptions.map && asset.sourceAndMap) {
                  const { source, map } = asset.sourceAndMap()
                  input = source
                  postcssOptions.map.prev = map ? map : false
                } else {
                  input = asset.source()
                }

                return minify(input, postcssOptions).then(res => {
                  if (res.map) {
                    compilation.assets[file] = new SourceMapSource(
                      res.css,
                      file,
                      res.map.toJSON()
                    )
                  } else {
                    compilation.assets[file] = new RawSource(res.css)
                  }
                })
              })
          )

cssnano-simple

A simple cssnano preset handler.

MIT
Latest version published 3 years ago

Package Health Score

47 / 100
Full package analysis

Popular cssnano-simple functions

Similar packages