patrickhulce / fontmin-webpack

Minifies icon fonts to just the used glyphs.
MIT License
139 stars 19 forks source link

fontmin-webpack does not recognize font if querystring in output filename #57

Closed ArTiSTiX closed 2 years ago

ArTiSTiX commented 2 years ago

For some reason, i use querystrings for cache bursting of assets, by appending something like an hash, allowing server to update files "in place".

This could notably done through file-loader by using:

        loader: 'file-loader',
        options: {
          name: '[name].[ext]?[hash]',
        },
      }

Due to the hash being at the end of the filename, fontmin-webpack no longer detects the extension at the end of filename, and completely ignores the files (which are not minified then).

patrickhulce commented 2 years ago

a query string shouldn't appear in the filename itself, wouldn't it appear in the reference to the file? or is that what you're saying breaks fontmin-webpack?

ArTiSTiX commented 2 years ago

@patrickhulce Yes, the querystring was referenced in the assets filenames, and was not handled by fontmin-webpack. All files having querystring were not treated through fontmin.