All Projects → zoobestik → csso-webpack-plugin

zoobestik / csso-webpack-plugin

Licence: MIT License
CSSO full restructuring minification files to serve your webpack bundles

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to csso-webpack-plugin

Babel Plugin Const Enum
Transform TypeScript `const` enums
Stars: ✭ 38 (-63.46%)
Mutual labels:  minify, compress
Imagemin
[Unmaintained] Minify images seamlessly
Stars: ✭ 4,948 (+4657.69%)
Mutual labels:  optimization, minify
Html Minifier Terser
actively maintained fork of html-minifier - minify HTML, CSS and JS code using terser - supports ES6 code
Stars: ✭ 106 (+1.92%)
Mutual labels:  minify, compress
minifier
Middleware to minify Html, CSS and Javascript responses
Stars: ✭ 15 (-85.58%)
Mutual labels:  minify, compress
Tiny Html Minifier
Minify HTML in PHP with just a single class
Stars: ✭ 114 (+9.62%)
Mutual labels:  minify, compress
LaraOutPress
This is simply compress your final out of Larvel Application and serve to the browser.
Stars: ✭ 56 (-46.15%)
Mutual labels:  minify, compress
photometric optimization
Photometric optimization code for creating the FLAME texture space and other applications
Stars: ✭ 271 (+160.58%)
Mutual labels:  optimization
pigosat
Go (golang) bindings for Picosat, the satisfiability solver
Stars: ✭ 15 (-85.58%)
Mutual labels:  optimization
nuxt-prune-html
🔌⚡ Nuxt module to prune html before sending it to the browser (it removes elements matching CSS selector(s)), useful for boosting performance showing a different HTML for bots/audits by removing all the scripts with dynamic rendering
Stars: ✭ 69 (-33.65%)
Mutual labels:  optimization
kafka-assignment-optimizer
Kafka Partitions Assignment Optimizer
Stars: ✭ 16 (-84.62%)
Mutual labels:  optimization
mlrHyperopt
Easy Hyper Parameter Optimization with mlr and mlrMBO.
Stars: ✭ 30 (-71.15%)
Mutual labels:  optimization
descent
First-order optimization tools
Stars: ✭ 23 (-77.88%)
Mutual labels:  optimization
Unreal-Development-Guides-and-Tips
High-level concept explanations, detailed tutorials, performance considerations, shortcuts and other useful content that aims to improve your Unreal Engine 4 development journey.
Stars: ✭ 118 (+13.46%)
Mutual labels:  optimization
energy-py-linear
Optimize battery storage using mixed integer linear programming
Stars: ✭ 33 (-68.27%)
Mutual labels:  optimization
pyPESTO
python Parameter EStimation TOolbox
Stars: ✭ 93 (-10.58%)
Mutual labels:  optimization
kirby-html-minifier
Minify the html output of a site built with Kirby CMS
Stars: ✭ 20 (-80.77%)
Mutual labels:  minify
pdf-scripts
📑 Scripts to repair, verify, OCR, compress, wrangle, crop (etc.) PDFs
Stars: ✭ 33 (-68.27%)
Mutual labels:  compress
windows10-debloat
Collection of various scripts and apps to debloat Windows 10 for better privacy, performance and optimization.
Stars: ✭ 52 (-50%)
Mutual labels:  optimization
gatsby-plugin-optimize-svgs
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
Stars: ✭ 39 (-62.5%)
Mutual labels:  minify
opt einsum fx
Einsum optimization using opt_einsum and PyTorch FX graph rewriting
Stars: ✭ 13 (-87.5%)
Mutual labels:  optimization

CSSO Webpack Plugin

npm node dependencies status downloads

Logo

Why is not csso-loader or postcss-csso?

  • Full restructuring in bundles: better

  • No problems with custom syntax like css-modules:global(.c .d) .a { color: #fff; } syntax

  • Possible to generate both pure and minimized versions at the same time.

Install

npm i -D csso-webpack-plugin

For node < 8.0.0 use 1.x version with csso@^3:

npm i -D csso-webpack-plugin@1

Usage

Plugin good to use in pair with ExtractTextPlugin or MiniCssExtractPlugin.

const CssoWebpackPlugin = require('csso-webpack-plugin').default;

module.exports = {
  module: { /* ... */ },
  plugins: [
    new MiniCssExtractPlugin({
      filename: "[name].css",
      chunkFilename: "[id].css"
    }),
    new CssoWebpackPlugin(),
  ]
}

Options

new CssoWebpackPlugin([options: CssoOptions], [filter: function | RegExp])

Arguments:

  • optionscsso options.
  • options.pluginOutputPostfixfunction(file) or string postfix, if passed, plugin will create two assets vanilla and compressed. Example:
    {
        plugins: [
            new ExtractTextPlugin('test.css'),
            new CssoWebpackPlugin({ pluginOutputPostfix: 'min' })
            /* Generated:
                test.css — uncompressed file
                test.min.css — minimized with csso file
            */
        ]
    }
  • filter — Detect should be file processed. Defaults: to ends with .css.

Flow support

I don't now why, but plugin ships with flow typings (typedef too). To use them in your project, add this to the [libs] section of your .flowconfig:

[libs]
node_modules/csso-webpack-plugin/lib/index.js.flow

Acknowledgements

Develop By Logo By MIT license

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].