1.0.0 • Published 7 years ago
prejss-styles-loader v1.0.0
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