npm.io
1.0.2 • Published 4 years ago

font-spider-webpack-plugin

Licence
MIT
Version
1.0.2
Deps
3
Size
32 kB
Vulns
0
Weekly
0
Stars
4

font-spider-webpack-plugin

npm node tests

基于 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配置项

License

MIT

Keywords