prejss-styles-loader
v1.0.0
Published
Webpack styles loader for prejss
Downloads
91
Readme
prejss-styles-loader
Styles loader for Webpack on top of PreJSS.
Process stylesheets from separate files via PostCSS to the JSS-like objects.
Installation
npm i -D prejss-styles-loader
or
yarn add -D prejss-styles-loader
Usage example
import injectSheet from 'react-jss'
// this style would become to JSS object literal
import style from './style.sss'
const App = () => // ...
// ...
export default injectSheet(style)(App)
styles.sss
.app
position: absolute
top: 0
left: 0
Webpack config example
rules: [{
test: /\.s[ac]?ss$/,
include: [
PATHS.app,
],
use: [
'prejss-styles-loader',
],
}]
Links
License
MIT