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
+19 -11
View File
@@ -1,11 +1,19 @@
/** /**
* PostCSS configuration used by Hugo Pipes (css.PostCSS) AND the standalone * PostCSS configuration used by Hugo Pipes (css.PostCSS) AND the standalone
* `npm run build:css` step. Requires the `postcss-cli` devDependency so Hugo * `npm run build:css` step. Requires the `postcss-cli` devDependency so Hugo
* can shell out to the local `postcss` binary during the asset pipeline. * can shell out to the local `postcss` binary during the asset pipeline.
*/ *
module.exports = { * The Tailwind config path is pinned to this file's directory. Tailwind v3
plugins: { * otherwise resolves tailwind.config.js relative to process.cwd(); when Hugo's
tailwindcss: {}, * PostCSS pipeline runs with a cwd other than the project root (notably in CI),
autoprefixer: {}, * 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: { config: path.join(__dirname, "tailwind.config.js") },
autoprefixer: {},
},
};