Coollabs fonts - replacement for Google font

coolLabs Fonts
coolLabs Fonts
A privacy-friendly drop-in replacement for Google Fonts
3 Replies
WillsterJohnson
dammit discord I'm following this thread let me link it
b1mind
b1mindOP2y ago
yea its been weird for me too
WillsterJohnson
May as well leave this in here; Here's how you can update your Vite-powered website to use coollabs instead of google fonts (or simply avoid changing your copy-pasted google fonts code). It also upgrades urls to https in case you accidentally included an insecure URL.
import { defineConfig } from "vite";

export default defineConfig({
plugins: [
...,
{
name: "vite-plugin-coollab-transform",
transform: (code) =>
code.replace(/"https?:\/\/fonts.googleapis.com/, '"https://api.fonts.coollabs.io/'),
},
],
});
import { defineConfig } from "vite";

export default defineConfig({
plugins: [
...,
{
name: "vite-plugin-coollab-transform",
transform: (code) =>
code.replace(/"https?:\/\/fonts.googleapis.com/, '"https://api.fonts.coollabs.io/'),
},
],
});
Want results from more Discord servers?
Add your server