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

font-manifest-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

font-manifest-webpack-plugin

Webpack plugin for generating font manifests

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-96.97%
Maintainers
1
Weekly downloads
 
Created
Source

Webpack Font Manifest Plugin

A webpack plugin for generating a font manifest.

What's a font manifest?

Similar to an asset manifest, a font manifest holds info about fonts used in your CSS build artefacts. This info can be used to optimize the font loading process, e.g. by generating preload hints or inlining the font face CSS.

{
  "/dist/myfont.8a1dbb54.woff2": {
    "family": "MyFont",
    "weight": "normal",
    "style": "normal",
    "format": "woff2",
    "url": "/dist/myfont.8a1dbb54.woff2",
    "css": "@font-face { /* */ }"
  },
  "/dist/myfont.bold.52d19f94.woff2": {
    "family": "MyFont",
    "weight": "bold",
    "style": "normal",
    "format": "woff2",
    "url": "/dist/myfont.bold.52d19f94.woff2",
    "css": "@font-face { /* */ }"
  }
}

Install

Using npm:

npm install font-manifest-webpack-plugin --save-dev

Usage

In your webpack.config.js file:

const FontManifestPlugin = require('font-manifest-webpack-plugin');

module.exports = {
  // an example entry definition
  entry: [ 'app.js'],
  plugins: [
    new FontManifestPlugin()
  ]
};

Options

All options and their defaults. See below for an explanation of individual options.

new FontManifestPlugin({
  formats: ['woff2', 'woff'],
  dataUris: false
})

formats

Array of font formats to include in the manifest.

dataUris

Whether data URIs are included in the generated manifest.

License

MIT

Keywords

FAQs

Package last updated on 19 Jan 2024

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