1.0.2 • Published 2 years ago
font-spider-webpack-plugin v1.0.2
font-spider-webpack-plugin
基于 font-spider 的 webpack 插件,支持 webpack v4 和 v5。
安装
npm install font-spider-webpack-plugin --save-dev
使用
const FontSpiderPlugin = require('font-spider-webpack-plugin')
// 默认处理所有字体
module.exports = {
plugins: [
// ...
new FontSpiderPlugin(),
],
}
// 只设置需要处理的字体
module.exports = {
plugins: [
// ...
new FontSpiderPlugin({
fonts: [],
fontSpiderOptions: {},
}),
],
}
Options
Name | Type | Default | Description |
---|---|---|---|
fonts | Array<String> | [] | 声明的font-family |
fontSpiderOptions | Object | {} | font-spider 配置项 |