Skip to content

Instantly share code, notes, and snippets.

@just-boris
Created April 10, 2016 21:05
Show Gist options
  • Save just-boris/7bc3881c5f92c916f674e6d4f46c06a7 to your computer and use it in GitHub Desktop.
Save just-boris/7bc3881c5f92c916f674e6d4f46c06a7 to your computer and use it in GitHub Desktop.
Reproduce issue with postcss-modules and cssnano
{
"name": "postcss-bug",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"cssnano": "^3.5.2",
"postcss": "^5.0.19",
"postcss-modules": "^0.4.0"
}
}
const postcss = require('postcss');
const cssnano = require('cssnano');
const modules = require('postcss-modules');
process.on('unhandledRejection', e => {
console.log(e.stack);
});
postcss([
cssnano(),
modules({
getJSON() {}
})
]).process('.a {color: white}')
.then(
result => console.log(result.css),
e => console.error(e.stack)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment