Skip to content

Instantly share code, notes, and snippets.

@amankkg
Last active October 25, 2016 19:00
Show Gist options
  • Save amankkg/2cd778bb4030e47a77ed0d9770ceec94 to your computer and use it in GitHub Desktop.
Save amankkg/2cd778bb4030e47a77ed0d9770ceec94 to your computer and use it in GitHub Desktop.
{
test: /\.(css|pcss)/,
use: [
'style',
{
loader: 'css',
options: {
importLoaders: 1,
sourceMap: isDebug,
modules: true,
localIdentName: isDebug ? '[name]_[local]_[hash:base64:3]' : '[hash:base64:4]',
minimize: !isDebug,
},
},
{
loader: 'postcss',
options: { // TypeError: Cannot read property 'config' of null ... at node_modules\postcss-load-config\index.js:50:22
parser: 'sugarss',
map: isDebug ? 'inline' : false,
plugins: () => [
require('postcss-smart-import'),
require('postcss-easy-import')({ extensions: ['.pcss'] }),
require('precss'),
require('postcss-cssnext'),
require('postcss-flexibility'),
require('postcss-nested-props'),
],
},
},
],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment