font-spider-webpack-plugin
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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

Package Sidebar

Install

npm i font-spider-webpack-plugin

Weekly Downloads

6

Version

1.0.2

License

MIT

Unpacked Size

32.6 kB

Total Files

9

Last publish

Collaborators

  • tianxing0923