Skip to content

lttb/prejss-styles-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 prejss-styles-loader -D

Usage example

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;
}

Webpack config example

rules: [{
  test: /\.s[ac]?ss$/,
  include: [
    PATHS.app,
  ],
  use: [
    'prejss-styles-loader',
  ],
}]

Links

License

MIT

About

Styles loader for Webpack on top of PreJSS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published