Replies: 1 comment
-
|
This error is coming from CSS Minification (Css Minimizer plugin), not from Docusaurus core or The key part is: This usually means invalid CSS reached the minifier, so the build fails. 🚨 Root cause (most common in Docusaurus)When using:
👉 The final generated CSS contains syntax that cssnano (minifier) cannot parse 🔥 Most likely issue in your caseSince you mentioned:
The issue is usually one of these: ❌ 1. Mixins not fully resolved before buildExample problem: @include myMixin;If PostCSS pipeline is not correctly configured, this remains in final CSS → minifier crashes. ❌ 2. Invalid or broken CSS output from pluginSome mixins generate:
❌ 3. Docusaurus CSS pipeline mismatchDocusaurus uses:
If plugin order is wrong → raw syntax reaches minimizer ✅ FIX 1 (most important): ensure PostCSS mixins run BEFORE Docusaurus processingCreate / update: module.exports = {
plugins: [
require('postcss-mixins'),
require('postcss-simple-vars'),
require('postcss-nested'),
require('autoprefixer'),
],
};👉 Order matters a lot:
✅ FIX 2: check your
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
buiding error for mixins https://github.com/postcss/postcss-mixins
Beta Was this translation helpful? Give feedback.
All reactions