Giter Site home page Giter Site logo

dhardtke / font-awesome-minify-plugin Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 2.0 529 KB

A Webpack Plugin that minifies your included FontAwesome CSS and fonts by only bundling the icons you are actually using

License: MIT License

JavaScript 100.00%
font-awesome plugin webpack

font-awesome-minify-plugin's Introduction

Hi there ๐Ÿ‘‹

trophy

font-awesome-minify-plugin's People

Contributors

dependabot[bot] avatar dhardtke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

meniam uscky

font-awesome-minify-plugin's Issues

Font files get a new chunkhash each compilation

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)

Unit Tests

Would be nice to ensure functionality for different versions of Font Awesome.

Plugin is not working for me :(

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?

SCSS support

It would be nice if SCSS (potentially even LESS) would be supported when using FontAwesome in one's project.

Hello

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

Please add support for Font Awesome Pro 5

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))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.