How to use csso-webpack-plugin - 2 common examples

To help you get started, we’ve selected a few csso-webpack-plugin 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 pastelsky / package-build-stats / src / webpack.config.js View on Github external
chunks: 'all',
            enforce: true,
          },
        },
      },
      minimizer: [
        new TerserPlugin({
          parallel: true,
          terserOptions: {
            ie8: false,
            output: {
              comments: false,
            },
          },
        }),
        new CssoWebpackPlugin({ restructure: false }),
      ],
    },
    plugins: [
      new webpack.IgnorePlugin(/^electron$/),
      new MiniCssExtractPlugin({
        // Options similar to the same options in webpackOptions.output
        // both options are optional
        filename: '[name].bundle.css',
        chunkFilename: '[id].bundle.css',
      }),
      // new WriteFilePlugin()
    ],
    resolve: {
      modules: ['node_modules'],
      symlinks: false,
      cacheWithContext: false,
github fabianmichael / kirby-imageset / webpack.config.js View on Github external
};

if(ENV === 'development') {
  config.devtool = 'source-map';
}

if(ENV === 'production') {

  config.entry['js/dist/imageset.min.js']  = './assets/js/src/imageset.js';
  config.entry['js/dist/respimage.min.js'] = './assets/js/src/respimage.js';

  config.plugins.push(new UglifyJsPlugin({
    include: /\.min\.js$/,
  }));

  config.plugins.push(new CssoWebpackPlugin({
    pluginOutputPostfix: 'min',
  }));
}

module.exports = config;

csso-webpack-plugin

CSSO minification files to serve your webpack bundles

MIT
Latest version published 4 years ago

Package Health Score

53 / 100
Full package analysis

Popular csso-webpack-plugin functions