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
If there are any possibilities how to configure preload for styles or scripts. I found out a plugin, but it requires HtmlWebpackPlugin to be initialized. How can i do it?
The pug-plugin is designed to replace the html-webpack-plugin, pug-loader and mini-css-extract-plugin completely.
The pug-plugin will never works together with HtmlWebpackPlugin. But very useful features of HtmlWebpackPlugin can be implemented in pug-plugin.
What do the preload-webpack-plugin?
Your imported JS file will be injected into HTML as the link tag like:
If there are any possibilities how to configure preload for styles or scripts
This doesn't make sense because all scripts and styles must be manually specified in the Pug template anyway. Therefore, the additional preload attribute can be added directly by yourself.
Тhe only thing that makes sense is the automatic addition of preloads for images, videos, fonts, etc, which was found in the template or in CSS (fonts, images). I put this idea on the stack.
Activity
webdiscus commentedon Jan 20, 2023
The pug-plugin is designed to replace the html-webpack-plugin, pug-loader and mini-css-extract-plugin completely.
The pug-plugin will never works together with HtmlWebpackPlugin. But very useful features of HtmlWebpackPlugin can be implemented in pug-plugin.
What do the preload-webpack-plugin?
Your imported JS file will be injected into HTML as the
linktag like:You can self this write in Pug:
The generated HTML:
P.S.: Can you please describe your feature request in details what do you concretely want.
ladown commentedon Jan 20, 2023
No doubt, that i can set preloaded resources by myself, but i want them to be set automatically, as mentioned plugin do.
[-]Preload support[/-][+][FEATURE REQUEST] Preload support[/+]webdiscus commentedon Mar 10, 2023
@ladown
This doesn't make sense because all scripts and styles must be manually specified in the Pug template anyway. Therefore, the additional preload attribute can be added directly by yourself.