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'
}
}
]
}