Skip to content
This repository has been archived by the owner on May 2, 2021. It is now read-only.

Kikobeats/shorthand-loader

Repository files navigation

shorthand-loader

Last version Dependency status Dev Dependencies Status NPM Status Donate

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.

About

Webpack Loader that rewrite CSS rules in short mode if is possible.

Resources

License

Stars

Watchers

Forks

Packages

No packages published