purgecss does not take publishDir setting into account #28
Closed
kGk0
started this conversation in
Issues and bugs
Replies: 2 comments
-
|
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
FYI, this was fixed by hbstack/hb#107, will be released in next version of |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello again
I have set publishDir in my _default config. Everything is ok when I build the dev version but I got an error in prod:
Error: error building site: POSTCSS: failed to transform "css/hb.css" (text/css): Error: Failed to parse runtime PurgeCSS config.
Please enable the "--renderToDisk" if you are using Hugo server.
Error: ENOENT: no such file or directory, open './public/.build/purgecss.json'
at Object. ([...]\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.7.1\ purgecss.config.js:14:11)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module.extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module.load (node:internal/modules/cjs/loader:960:12)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object. ([...]\modules\filecache\modules\pkg\mod\github.com\hbstack\hb@v0.7.1\postcss.config.js:20:16)
And effectively purgecss directly use the public path instead of publishDir:
let rawConfig = fs.readFileSync('./public/.build/purgecss.json')Cheers
Beta Was this translation helpful? Give feedback.
All reactions