Closed markdumay closed 8 months ago
I just tested this OK:
hugo new site my-hinode-site && cd my-hinode-site
hugo mod init example.com/my-hinode-site
echo "[[module.imports]]" >> hugo.toml
echo "path = 'github.com/gethinode/hinode'" >> hugo.toml
hugo mod vendor
hugo server
You are right that it fails when running the vendored version directly from the theme, but comparing the vendored directories from v0.122 and v0.123 shows that they are the same, which means that it's not the vendoring that's failing.
Hmm.
OK, I think I see what's happening now.
That’s encouraging!
As a side note, the single reason to vendor the modules is to provide a consistent path for the safe listed files for the purge-css utility. As far as I’m aware, these (external) utilities do not have access to the Hugo mounts. But perhaps there’s a more elegant approach?
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
Context
When upgrading Hugo from v0.122.0 to v0.123.3 I get a CSS transpiler error. Below the full error logs (specific to the Hinode theme):
The error only occurs when running
hugo mod vendor
.To reproduce
Removing the
_vendor
directory solves theTOCSS
transpiler error (it doesn't seem to matter if usinglibsass
ordartsass
).Rationale
The Hinode theme vendors its modules to add specific CSS files to a safe list, preventing certain style definitions to be purged from the final CSS file. See
config/postcss.config.js
for more details. Purge is enabled by settingpurge = true
in the[style]
section ofconfig/_default/params.toml
.