Clean up unresolved asset warnings from frontend build
Compiling the frontend of the site throws warnings like this on a fresh build:
../gitlab_ui/fonts/GitLabSans.woff2 referenced in /builds/gitlab-org/technical-writing-group/gitlab-docs-hugo/themes/gitlab-docs/assets/css/main.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
Example in the pipeline: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/jobs/6826632259#L55
These come up because we copy GitLab UI assets into the theme at build time (config for this here), but we also reference some of them from CSS files.
We can avoid the warnings by declaring all these assets as external
, but we'd need to do this in a way that will work before the copy operation runs (this did not work because externalAssets
is empty on a fresh build).
The warnings are safe to ignore, these paths do resolve when the build is complete, but they add a lot of noise.
There may be a way to avoid these by changing how we reference them from CSS, or by changing the order of operations of the build.