一覧へ戻る
kymok/rollup-plugin-font-subsetter(新しいタブで開きます)
主要言語: TypeScript
Subsets fonts at bundle time based on page contents.
- star 数
- 17
- watcher 数
- 1
- fork 数
- 1
- issue 数
- 1
- 最終更新
- 2025/06/28
主要言語: TypeScript
Subsets fonts at bundle time based on page contents.
A Rollup plugin that subsets fonts at build time based on source code (html, css, js/ts) contents. Suitable for static sites and applications where the character set is known at build time.
npm install rollup-plugin-font-subsetter --save-dev
create a rollup.config.js and import the plugin.
// rollup.config.js import { fontSubsetter } from "rollup-plugin-font-subsetter"; export default defineConfig({ plugins: [ fontSubsetter(), ] })
The plugin subsets .woff2 font files for character set computed from .htm/.html, .css, .js files in resulting bundle. This plugin is using subset-font under the hood.