the editable site (validation-lab)
This commit is contained in:
commit
3ac81d5a52
13454 files changed
+2227005
No files matched your search
+17
@@ -0,0 +1,17 @@
|
||||
import { FONTS_TYPES_FILE } from "./constants.js";
|
||||
function syncFonts(settings) {
|
||||
if (!settings.config.experimental.fonts) {
|
||||
return;
|
||||
}
|
||||
settings.injectedTypes.push({
|
||||
filename: FONTS_TYPES_FILE,
|
||||
content: `declare module 'astro:assets' {
|
||||
/** @internal */
|
||||
export type CssVariable = (${JSON.stringify(settings.config.experimental.fonts.map((family) => family.cssVariable))})[number];
|
||||
}
|
||||
`
|
||||
});
|
||||
}
|
||||
export {
|
||||
syncFonts
|
||||
};
|
||||
Reference in new issue
Block a user