]> git.maquefel.me Git - brevno-suite/hugo/commit
hugofs: Make node_modules a "special case" mount
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 24 Oct 2025 08:36:32 +0000 (10:36 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 24 Oct 2025 15:12:46 +0000 (17:12 +0200)
commit809ebe01fa954a44a48c265f0c9a4e4845b9a0f8
tree74c78436fdf09140260605260fae23d1d6a89488
parent08a0679a895678b38f1324ae78503fd32ec22996
hugofs: Make node_modules a "special case" mount

For this and similar mounts in a theme:

```toml
[[module.mounts]]
source = 'node_modules/bootstrap'
target = 'assets/vendor/bootstrap'
```

We first check the theme itself, then the project root.

For backwards compatibility, we also make any `../../node_modules/...` `source` paths into `node_modules/...` paths when defined in themes/modules.

Fixes #14089
hugofs/hugofs_integration_test.go
modules/collect.go