mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 18:07:24 -04:00
Update postprocess.md
- only in prod
This commit is contained in:
parent
9593e3991b
commit
f275ab778b
@ -52,6 +52,12 @@ const purgecss = require('@fullhuman/postcss-purgecss')({
|
|||||||
return els.tags.concat(els.classes, els.ids);
|
return els.tags.concat(els.classes, els.ids);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
plugins: [
|
||||||
|
...(process.env.HUGO_ENVIRONMENT === 'production' ? [ purgecss ] : [])
|
||||||
|
]
|
||||||
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that in the example above, the "CSS purge step" will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS:
|
Note that in the example above, the "CSS purge step" will only be applied to the production build. This means that you need to do something like this in your head template to build and include your CSS:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user