Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

font-config-webpack-plugin

Package Overview
Dependencies
Maintainers
5
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-config-webpack-plugin

Preset for font webpack configuration

  • 2.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
174
decreased by-34.59%
Maintainers
5
Weekly downloads
 
Created
Source

NPM version Travis Appveyor lerna License Commitizen friendly Prettier

font-config-webpack-plugin

Creating a webpack loader configurations can be quite time consuming.
The font-config-webpack-plugin is part of the common-config-webpack-plugin suite which tries to provide best practices for the most common loader requirements.

If no mode is explicitly set for the plugin the configuration will adjust depending on your webpack mode setting.
⚙️development mode webpack.config.js ⚙️production mode webpack.config.js

Installation

npm i --save-dev font-config-webpack-plugin

Webpack Config

In most projects you will need to set up project specific options but you can still use all or some common-config-webpack-plugin parts.

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

Changing the fonts file name

By default the font-config-webpack-plugin adds a md5 hash of the font files content to the file name to allow long-term-caching.

For example: static/media/OpenSans-Regular-webfont.c8ffdeb3.woff

To change the file name path an option called name can be passed to the font-config-webpack-plugin.
The name option supports different placeholders.

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

Keywords

FAQs

Package last updated on 18 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc