sn-satyendra / webpack-font-preload-plugin

A webpack plugin to allow preloading or prefetch of fonts.
MIT License
20 stars 10 forks source link

Does this plugin uses the old loaders from webpack? #37

Open kevinmu17 opened 2 years ago

kevinmu17 commented 2 years ago

Since webpack 5 is launched the old loaders are replaced. See https://webpack.js.org/guides/asset-modules/ for more info.

I can't get this plugin to function. I'm using Twig templates and my head tags are in a base.twig file. Can this even work?

webpack: 5.65.0
webpack-font-preload-plugin: 1.5.0
sn-satyendra commented 2 years ago

@kevinmu17 the loaders shouldn't be an issue. As long as your build process outputs an index.html and the fonts, this should work. This plugin works on the emitted assets (which might change in future, but should work with 1.x.x). In fact the asset/resource loader type is covered by the plugin.

Can you provide a minimum configuration and test scenario which can be used to test your use case (using twig templates) ?