Skip to content

Instantly share code, notes, and snippets.

@jgierer12
Created March 31, 2018 21:30
Show Gist options
  • 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