dhardtke / font-awesome-minify-plugin Goto Github PK
View Code? Open in Web Editor NEWA Webpack Plugin that minifies your included FontAwesome CSS and fonts by only bundling the icons you are actually using
License: MIT License
A Webpack Plugin that minifies your included FontAwesome CSS and fonts by only bundling the icons you are actually using
License: MIT License
For some reason each time the build is started, webpack yields a new chunkhash for each font file generated by the plugin.
I am starting to believe it has something to do with the way the plugin hooks into the compilation process (using the NormalModuleFactory)
Would be nice to ensure functionality for different versions of Font Awesome.
Would be nice if this can support SVG/JS version =>all.js
.
Greetings all,
I am trying to get running with this great plugin with no success.
You can find my repo code here
Here is a snippet on how I am configuring the plugin:
new FontAwesomeMinifyPlugin({
srcDir: path.resolve(/* path to my source directory */),
})
Here is how I am including the FA css:
@import '@fortawesome/fontawesome-free/css/all';
If I run my build script in package.json, I still get full sized font icon files.
What am I doing wrong?
It would be nice if SCSS (potentially even LESS) would be supported when using FontAwesome in one's project.
Dear Mr.dhardtke,
Hello, my name is David.
Can I ask you a favor regarding font-awesome-minify-plugin?
I'm using Wordpress and FA is loaded from local server(not CDN)
I would like to purge unused FA because of heavy file size(280KB total)
Can I use your git to purge unused FA on my Wordpress?
I would like to minify files, font-awesome.min.css, fa-brands-400.woff2, fa-light-300.woff2, fa-regular-400.woff2, fa-solid-900.woff2
I'm looking forward to hearing from you.
Thank you so much in advance.
Best regards,
David
Font awesome pro has brands.css, regular.css, solid.css and light.css icon versions.
Your code supports only brands, regular and solid, please add "light" to this regexp:
else if (/(solid|regular|brands).css/.test(data.resource))
E.g. write only woff/woff2, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.