Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Optimize FontAwesome font (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed Dec 7, 2020
1 parent 9190df0 commit 745b66b
Show file tree
Hide file tree
Showing 3 changed files with 943 additions and 44 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"drmonty-leaflet-awesome-markers": "~2.0.2",
"extract-domain": "~2.0.4",
"file-loader": "~2.0.0",
"fontmin-webpack": "^2.0.1",
"handlebars": "^4.3.0",
"html-webpack-plugin": "^4.5.0",
"i18n-postal-address": "~0.0.6",
Expand Down
11 changes: 10 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const FontminPlugin = require('fontmin-webpack');

const entry = {
main: './js/main.js',
Expand Down Expand Up @@ -74,6 +75,14 @@ module.exports = {
chunks: ['test']
}),
new MiniCssExtractPlugin(),
new OptimizeCssAssetsPlugin()
new OptimizeCssAssetsPlugin(),
new FontminPlugin({
autodetect: false,
// Taken from https://fontawesome.com/cheatsheet.
glyphs: [
'\uf002', '\uf0b0', '\uf041', '\uf013', '\uf055', '\uf188', '\uf129', '\uf140',
'\uf111', '\uf1ce', '\uf192', '\uf05e', '\uf0c9',
],
}),
],
};
Loading

0 comments on commit 745b66b

Please sign in to comment.