Miss any of our Open RFC calls?Watch the recordings here! »

shorthand-loader

1.0.0 • Public • Published

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.

Install

npm i shorthand-loader

DownloadsWeekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar