Open pashasadri opened 3 years ago
I'm having the same issue with postcss-nested
as well as postcss-simple-vars
.postcssrc.json
{
"plugins": {
"postcss-mixins": {},
"postcss-simple-vars": {},
"postcss-nested": {},
"postcss-flexbugs-fixes": {},
"postcss-preset-env": {
"stage": false,
"features": {
"media-query-ranges": true
}
},
"autoprefixer": {
"flexbox": "no-2009",
"grid": true
}
}
}
package.json
{
"dependencies": {
"@toastal/parcel-transformer-dhall-json": "^0.0.2",
"@toastal/parcel-transformer-dhall-webmanifest": "^0.0.5",
"@toastal/parcel-utils-dhall": "^0.0.1",
"autoprefixer": "^10.2.4",
"hash-wasm": "^4.4.1",
"parcel": "^2.0.0-beta.1",
"postcss": "^8.2.4",
"postcss-flexbugs-fixes": "^5.0.2",
"postcss-import": "^14.0.0",
"postcss-mixins": "^7.0.1",
"postcss-nested": "^5.0.3",
"postcss-simple-vars": "^6.0.3",
"sugarss": "^3.0.3"
},
"devDependencies": {
"concurrently": "^5.3.0",
"rimraf": "^3.0.2"
}
}
Error also. This stack trace is just as unhelpful as the above.
🚨 Build failed.
@parcel/transformer-postcss: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:173:27)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
at Proxy.toJSON (/home/USER/PROJECT/frontends/pwa/node_modules/postcss/lib/node.js:192:29)
I moved from postcss-nested
to postcss-nesting
and removed the few case of simple vars.
This might be fixed with https://github.com/postcss/postcss/commit/5797a438599ddfd320a7ff22eee089e07db5dfea.
Can you try it with postcss@8.2.6
?
@mischnic same problem with "postcss": "^8.4.21",
but honesly I don't know if in my project it's related to postcss
🐛 bug report
I have been having trouble getting postcss-nested to work with parcelv2 + tailwind
🎛 Configuration (.babelrc, package.json, cli command)
node v14.8.0
The CSS I'm trying to build
postcss.config.js
🤔 Expected Behavior
I expected parcel to process the css file to emit a flattened version
😯 Current Behavior
🔦 Context
My goal is to create scoped CSS by using all:initial and all the tailwind and custom rules nested inside a unique #id css selector. postcss-nest is supposed to flatten the nested css into a usable form.
My work around has been to generate the scoped css using postcss-cli and postcss-nested outside of parcel's build pipeline. But this solution is messy and can't make use of the dev server and HMR :-(