1.0.2 • Published 2 years ago

font-spider-webpack-plugin v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

NameTypeDefaultDescription
fontsArray<String>[]声明的font-family
fontSpiderOptionsObject{}font-spider配置项

License

MIT