shorthand-loader
Webpack Loader that rewrite CSS rules in short mode if is possible.
Turns CSS rules like:
body {
background-image: url(/img/meow.jpg);
background-position: top center;
}
in the short mode:
body{background:url(/img/meow.jpg) top}
And Saves bytes!
Install
$ npm install shorthand-loader --save
Usage
Load it at the end of your CSS loaders pipeline, for example:
module: {
loaders: [{
test: /(\.scss|\.css)$/,
loader: ExtractTextPlugin.extract('style', 'css?minimize&sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]!postcss!sass!shorthand')
}]
}
License
MIT © Kiko Beats.