Closed IlyaSemenov closed 1 year ago
For what it's worth, I switched to https://github.com/jeerbl/webfonts-loader.
It suffers from similar problems when handling publicPath
(https://github.com/jeerbl/webfonts-loader/issues/36, https://github.com/jeerbl/webfonts-loader/pull/37) but at least I still can use LoaderOptionsPlugin
fallback.
I still can't recall the reason why I removed this capability.
As of 0.3.0, the only way to push a custom public path is to hard-code it in each font config.
This is ridiculous and it breaks the principle of the separation of concerns. A font config must be aware about the icons and fonts stuff (formats, CSS prefixes and such) but not about the delivery internals. If I want to switch the minified assets path, or use a CDN, this doesn't have anything to do with the icons, and should not require updating the font config.
In 0.2.9, I was using this:
As of 0.3.0, it's not possible anymore.
Ideally, font-gen-loader should pick
webpack.output.publicPath
automatically.