silverstripe / webpack-config

Reusable webpack bundle declarations for Silverstripe modules
BSD 3-Clause "New" or "Revised" License
16 stars 9 forks source link

FIX Add a querystring hash to fonts #47

Closed emteknetnz closed 4 years ago

emteknetnz commented 4 years ago

Fixes https://github.com/silverstripe/silverstripe-admin/issues/1064

https://www.npmjs.com/package/file-loader#options

admin/client/src/styles/_fonts.scss

image

admin/client/dist/styles/bundle.css

Before image

After image

emteknetnz commented 4 years ago

Note, to get #iefix and #silverstripe hashes to stay in compiled css, can add this

Change

    {
      loader: 'resolve-url-loader',
    },

To

    {
      loader: 'resolve-url-loader',
      options: {
        keepQuery: true
      },
    },

However I think this makes zero difference in practice because this is for very old browsers. IE11 still works fine as is, so I'd rather not introduce this as it has a slight chance of creating a regression somewhere else