When you add a mount, the default mount for the concerned target root is ignored: be sure to explicitly add it.
If I want to mount
[[module.mounts]]
source = "node_modules/bootstrap-icons/font/fonts"
target = "static/paige/bootstrap-icons/fonts"
then I also have to mount
[[module.mounts]]
source = "static"
target = "static"
[[module.mounts]]
source = "layouts"
target = "layouts"
[[module.mounts]]
source = "assets"
target = "assets"
just to avoid a build error, and I would guess that I should just do this for all mount directories listed in the doc anyway, just in case.
This is tedious and error-prone.
Could it work to instead have the default mounts stay in place unless they are explicitly overridden?
For example, if I want to override layouts, I can explicitly do
[[module.mounts]]
source = "my-layouts"
target = "layouts"
Otherwise, the default is
[[module.mounts]]
source = "layouts"
target = "layouts"
and I can mount things in /layouts
easily:
[[module.mounts]]
source = "mything/foo"
target = "layouts/foo"
If someone explicitly sets the default, they get the current behavior. I don’t see a back compat issue with this change.