fix: pin Tailwind config path + absolute content globs (cwd-independent PostCSS for CI)
This commit is contained in:
+9
-1
@@ -2,10 +2,18 @@
|
|||||||
* 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.
|
||||||
|
*
|
||||||
|
* 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 = {
|
module.exports = {
|
||||||
plugins: {
|
plugins: {
|
||||||
tailwindcss: {},
|
tailwindcss: { config: path.join(__dirname, "tailwind.config.js") },
|
||||||
autoprefixer: {},
|
autoprefixer: {},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user