A webpack loader to convert the output of the css-loader to plain javascript object.
This is quite useful for situations where you have all of your css rules and variables in one stylesheet and want to receive the styles in literal object format for further use in your code base.
npm install css-js-loader --save-dev
var styles = require('css-js-loader!css-loader!./file.css');{
...
module: {
loaders: [
{ test: /\.js\.css$/, loader: 'css-js-loader!css-loader' }
]
}
}This loader was originally created to be used with React component styling via 'style' property.