preload-font-plugin
A webpack plugin for font preload.
Requirements
Set before html-webpack-plugin.
Installation
$ npm i -D preload-font-plugin
Usage
plugins: // relative to process.cwd() './src/demo.ttf': rel: 'preload' as: 'font' type: 'font/ttf' crossorigin: 'anonymous' preserveQuery: true chunks: 'app' 'vendors'
output
Options
A simple object, whose key is the file relative to process.cwd()
, preserveQuery
query string should be preserved or not, default false
. other value as attributes of <link>
.