Skip to content

Instantly share code, notes, and snippets.

@jgierer12
Created March 31, 2018 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jgierer12/97a80559ca8ad9a208f2201a37d1fe23 to your computer and use it in GitHub Desktop.
Save jgierer12/97a80559ca8ad9a208f2201a37d1fe23 to your computer and use it in GitHub Desktop.
Minimal CSS Modules + PostCSS webpack config
module.exports = {
plugins: {
'postcss-cssnext': {},
// other plugins (https://github.com/postcss/postcss#plugins)
'cssnano': {}
}
}
module.exports = {
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
importLoaders: 1,
modules: true
}
},
'postcss-loader'
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment