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