
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
fontmin-webpack
Advanced tools
Minifies icon fonts to just what is used.
# for webpack 5
npm install --save-dev fontmin-webpack
# for webpack 4
npm install --save-dev fontmin-webpack@^2.0.1
# for webpack <=3
npm install --save-dev fontmin-webpack@^1.0.2
fontmin to minify the TrueType font to only the used glyphsttf, eot, svg, woff, and woff2 although you should really only need to care about woff)npm install --save-dev fontmin-webpack
The example below uses glyphs \uf0c7 and \uf0ce
@font-face {
font-family: 'FontAwesome';
src: url('fontawesome-webfont.eot') format('embedded-opentype'), url('fontawesome-webfont.woff2')
format('woff2'), url('fontawesome-webfont.woff') format('woff'), url('fontawesome-webfont.ttf')
format('ttf');
}
/**
* Remove other unused icons from the file.
*/
.fa-save:before,
.fa-floppy-o:before {
content: '\f0c7';
}
.fa-table:before {
content: '\f0ce';
}
const FontminPlugin = require('fontmin-webpack')
module.exports = {
entry: 'my-entry.js',
output: {
// ...
},
plugins: [
// ...
new FontminPlugin({
autodetect: true, // automatically pull unicode characters from CSS
glyphs: ['\uf0c8' /* extra glyphs to include */],
// note: these settings are mutually exclusive and allowedFilesRegex has priority over skippedFilesRegex
allowedFilesRegex: null, // RegExp to only target specific fonts by their names
skippedFilesRegex: null, // RegExp to skip specific fonts by their names
}),
],
}
Before
674f50d287a8c48dc19ba404d20fe713.eot 166 kB [emitted]
912ec66d7572ff821749319396470bde.svg 444 kB [emitted] [big]
b06871f281fee6b241d60582ae9369b9.ttf 166 kB [emitted]
af7ae505a9eed503f8b8e6982036873e.woff2 77.2 kB [emitted]
fee66e712a8a08eef5805a46892932ad.woff 98 kB [emitted]
After
674f50d287a8c48dc19ba404d20fe713.eot 2.82 kB [emitted]
912ec66d7572ff821749319396470bde.svg 2.88 kB [emitted]
b06871f281fee6b241d60582ae9369b9.ttf 2.64 kB [emitted]
af7ae505a9eed503f8b8e6982036873e.woff2 1.01 kB [emitted]
fee66e712a8a08eef5805a46892932ad.woff 2.72 kB [emitted]
file-loaderFAQs
Minifies icon fonts to just what is used.
The npm package fontmin-webpack receives a total of 213 weekly downloads. As such, fontmin-webpack popularity was classified as not popular.
We found that fontmin-webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.