fix: pin Tailwind config path + absolute content globs (cwd-independent PostCSS for CI)

This commit is contained in:
2026-07-16 06:50:13 +03:00
parent 1816ff2093
commit 0cf0962186
+9 -1
View File
@@ -2,10 +2,18 @@
* PostCSS configuration used by Hugo Pipes (css.PostCSS) AND the standalone
* `npm run build:css` step. Requires the `postcss-cli` devDependency so Hugo
* can shell out to the local `postcss` binary during the asset pipeline.
*
* The Tailwind config path is pinned to this file's directory. Tailwind v3
* otherwise resolves tailwind.config.js relative to process.cwd(); when Hugo's
* PostCSS pipeline runs with a cwd other than the project root (notably in CI),
* the config is not found, `content` is empty, and @apply'd utilities like
* `text-secondary` fail with "class does not exist". Pinning it fixes that.
*/
const path = require("path");
module.exports = {
plugins: {
tailwindcss: {},
tailwindcss: { config: path.join(__dirname, "tailwind.config.js") },
autoprefixer: {},
},
};