Skip to content

pieced-team/font-config-webpack-plugin

Repository files navigation

@pieced/font-config-webpack-plugin 👋

Version Download Webpack Last Commit License: MIT

Automatically configuration webpack5 font loader

Install

npm i --save-dev @pieced/font-config-webpack-plugin

Webpack Config

const FontConfigWebpackPlugin = require('@pieced/font-config-webpack-plugin');
module.exports = {
  plugins: [new FontConfigWebpackPlugin()],
};

Options

suffix

  • type array
  • default ['woff', 'woff2', 'eot', 'ttf', 'otf']

generator

const defaultGenerator = {
  filename: webpack.mode === 'development' ? '[path][name][ext]' : 'static/font/[contenthash:10][ext]',
}

About

Automatically configuration webpack5 font loader

Resources

License

Stars

Watchers

Forks

Packages

No packages published