You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know this plugin is not developed anymore, written for WP4, but right now it's somewhat compatible with WP5 yet few features stopped working, probably caused by hook name changes (i. e. compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration does not exist anymore). I wasn't able to make a quick fix in code, as I don't understand webpack, html plugin nor this plguin enough to make it work again. Maybe I'll immerse into it one day but I doubt it. Nonetheless I've made quick&dirty workaround for generating link tag in HTML without creating a template like an answer in Issue #8 suggests based on https://github.com/jantimon/html-webpack-plugin#beforeassettaggeneration-hook
Heres the code you can paste directly to webpack.config.js (or anywhere else and include it using require):
Than it's enough to use furher in wp configuration:
plugins: [newGoogleFontsPlugin({fonts: [{family: "Source Sans Pro"},{family: "Roboto"},{family: "Vollkorn"}],local: true}),newInsertFontCSS("./fonts.css"),newHtmlWebpackPlugin({"title": "My fonts are working, yay!"}),]
The text was updated successfully, but these errors were encountered:
Hi,
I know this plugin is not developed anymore, written for WP4, but right now it's somewhat compatible with WP5 yet few features stopped working, probably caused by hook name changes (i. e.
compilation.hooks.htmlWebpackPluginBeforeHtmlGeneration
does not exist anymore). I wasn't able to make a quick fix in code, as I don't understand webpack, html plugin nor this plguin enough to make it work again. Maybe I'll immerse into it one day but I doubt it. Nonetheless I've made quick&dirty workaround for generatinglink
tag in HTML without creating a template like an answer in Issue #8 suggests based on https://github.com/jantimon/html-webpack-plugin#beforeassettaggeneration-hookHeres the code you can paste directly to
webpack.config.js
(or anywhere else and include it usingrequire
):Than it's enough to use furher in wp configuration:
The text was updated successfully, but these errors were encountered: