Inject with HtmlWebpackPlugin
See original GitHub issueQuestion: Is there something that needs to be set up to make automatic injection work? I see that the icon folder is generated but the injections doesnt work. Here the plugin part of my webpack config.
...
plugins: [
new webpack.HotModuleReplacementPlugin(),
new FaviconsWebpackPlugin({
logo: path.resolve(__dirname, 'dist/images/nova.png'),
inject: true
}),
new HtmlWebpackPlugin({
filename: indexHtmlName,
template: 'public/index.html',
inject: 'head',
hash: true
})
]
...
Thanks in advance!
Issue Analytics
- State:
- Created 6 years ago
- Comments:16 (6 by maintainers)
Top Results From Across the Web
inject-html-webpack-plugin - npm
inspired by html-webpack-plugin,simple and efficient Webpack plugin that inject script label and style links into your html ...
Read more >HtmlWebpackPlugin - inject js in body at a specifc place
I am using HtmlWebpackPlugin to inject javascript into my ...
Read more >HtmlWebpackPlugin | webpack
The HtmlWebpackPlugin simplifies creation of HTML files to serve your webpack bundles. ... Add the plugin to your webpack configuration as follows:
Read more >Inject a JavaScript bundle into HTML with the ... - Egghead.io
In this lesson, we'll see how to use the HtmlWebpackPlugin to inject the script tag for our bundle into an HTML template file....
Read more >inject-html-webpack-plugin - npm package - Snyk
The npm package inject-html-webpack-plugin receives a total of 3,441 weekly downloads. As such, inject-html-webpack-plugin popularity was classified as small.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Konafets by default during development the FaviconsWebpackPlugin will not generate all logos to keep your webpack bootup time as fast as possible.
For production build you should see more favicons generated.
If you need all favicons already during development you can set the mode to webapp:
I had the same problem. Got it resolved by setting the inject property of HtmlWebpackPlugin to true.
I am using favicons-webpack-plugin 3.x with html-webpack-plugin 4.x