Summary
Both the prebuilt CSS bundles and the SCSS source hardcode an @import for Google Fonts with no way to opt out. It's the first line applied by the stylesheet, so in offline / air-gapped / OT networks (where the outbound request is silently dropped rather than refused) the browser blocks for ~30s waiting for the connection to time out before it finishes applying the stylesheet. It also trips strict Content-Security-Policy setups that don't allow fonts.googleapis.com.
Where it lives
The import is line 1 of scss/_global.scss:
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&display=swap');
...
font-family: 'Source Sans Pro', sans-serif;
Every theme pulls it in unconditionally via @import './global', so it ends up in all prebuilt bundles:
@vueform/vueform/dist/*.css (all theme + .nodark variants)
@vueform/builder/{vueform,index,tailwind}.css
Because it's a literal line rather than a guarded @if, even compiling from the ./scss/* source still emits it.
Why the current workarounds are poor
- Editing the vendored CSS — wiped on every
npm install / CI run.
- Compiling from SCSS —
_global.scss still @imports the CDN font.
- Patching (
pnpm patch / patch-package) — fragile across version bumps.
- Build-time strip plugin — what we ended up doing (a Vite
generateBundle hook that removes the @import), but that's the consumer papering over a library default.
Requested change (any one of these)
- A SCSS flag, e.g.
$vf-load-google-fonts: true !default; guarding the @import, so consumers can set it to false before importing.
- A "no-fonts" CSS variant alongside the existing
.nodark bundles (e.g. vueform.nofonts.css), leaving font-family: 'Source Sans Pro', sans-serif intact so self-hosted fonts still apply.
- At minimum, document that the font is bundled and how to self-host it, so offline deployments know to strip/replace it.
Self-hosting the font (or falling back to the sans-serif stack already in the declaration) covers the offline use case cleanly — the only blocker is that the CDN @import can't be turned off.
Environment
@vueform/vueform 1.13.11
@vueform/builder 1.12.12
- Vite build, fonts self-hosted by the host application
Summary
Both the prebuilt CSS bundles and the SCSS source hardcode an
@importfor Google Fonts with no way to opt out. It's the first line applied by the stylesheet, so in offline / air-gapped / OT networks (where the outbound request is silently dropped rather than refused) the browser blocks for ~30s waiting for the connection to time out before it finishes applying the stylesheet. It also trips strictContent-Security-Policysetups that don't allowfonts.googleapis.com.Where it lives
The import is line 1 of
scss/_global.scss:Every theme pulls it in unconditionally via
@import './global', so it ends up in all prebuilt bundles:@vueform/vueform/dist/*.css(all theme +.nodarkvariants)@vueform/builder/{vueform,index,tailwind}.cssBecause it's a literal line rather than a guarded
@if, even compiling from the./scss/*source still emits it.Why the current workarounds are poor
npm install/ CI run._global.scssstill@imports the CDN font.pnpm patch/patch-package) — fragile across version bumps.generateBundlehook that removes the@import), but that's the consumer papering over a library default.Requested change (any one of these)
$vf-load-google-fonts: true !default;guarding the@import, so consumers can set it tofalsebefore importing..nodarkbundles (e.g.vueform.nofonts.css), leavingfont-family: 'Source Sans Pro', sans-serifintact so self-hosted fonts still apply.Self-hosting the font (or falling back to the
sans-serifstack already in the declaration) covers the offline use case cleanly — the only blocker is that the CDN@importcan't be turned off.Environment
@vueform/vueform1.13.11@vueform/builder1.12.12