font-webpack-loader

1.0.2 • Public • Published

font-webpack-loader

Fontmin loader for webpack,use to cut font files from texts.

Suport: ttf,eot,woff,woff2,svg

You can use charactor-scanner if you want to pick charactors from your code files.

const Scan = require('charactor-scanner');
let text = Scan({
  dir: path.resolve(__dirname, './directory'),
  sync: true
}).join('')

Usage

npm install font-webpack-loader -D

config:

{
  test: /\.(svg|woff|woff2|ttf|eot)$/,
  use: [
    {
      loader: 'font-webpack-loader',
      options: {
        limit: 1000,
        name: '[name].[hash].[ext]',
        text: 'benweng'
      }
    }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i font-webpack-loader

Weekly Downloads

103

Version

1.0.2

License

ISC

Unpacked Size

6.01 kB

Total Files

3

Last publish

Collaborators

  • benweng