// vite.config.ts
import { resolve } from 'path';
import { defineConfig } from 'vite';
import { viteSvgToWebfont } from 'vite-svg-2-webfont';
import { vitePluginPreloadWebfont } from 'vite-plugin-preload-webfont'
const webfontFolder = resolve('./src/webfont');
export default defineConfig({
plugins: [
viteSvgToWebfont({
context: webfontFolder,
htmlDest: resolve(webfontFolder, 'icons.ts'),
htmlTemplate: resolve(webfontFolder, 'icons.ts.hbs'),
fontName: 'exampleIcon',
baseSelector: '.exIcon',
generateFiles: 'html',
}),
vitePluginPreloadWebfont({ preloadFormats: ['woff2'] }),
],
});
-
Notifications
You must be signed in to change notification settings - Fork 0
License
stryaponoff/vite-plugin-preload-webfont
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published