intervolga / optimize-cssnano-plugin

WebPack 2+ plugin for CSS minification after ExtractTextPluging
MIT License
25 stars 6 forks source link

sourceMap option #4

Open MartinCerny-awin opened 6 years ago

MartinCerny-awin commented 6 years ago

What nextSourceMap value for sourceMap option mean? Isn't it supposed to be string? I would expect that it is one of these values https://webpack.js.org/configuration/devtool/ If not, could you please describe what it is.

shkarupa-alex commented 6 years ago

Where did you find that option?

MartinCerny-awin commented 6 years ago

it is in readme https://github.com/intervolga/optimize-cssnano-plugin/blob/master/README.md

  plugins: [
    new ExtractTextPlugin("styles.css"),

    new OptimizeCssnanoPlugin({
      sourceMap: nextSourceMap,
      cssnanoOptions: {
        preset: ['default', {
          discardComments: {
            removeAll: true,
          },
        }],
      },
    }),
  ]
shkarupa-alex commented 6 years ago

Sorry, that is misspell. Source map should be boolean. In my projects true for development, false for production.