For example, I have a module “menu”. This module depends on the modules menu.js, menu.css. There are several styles in menu.css with the image url. For example, there is menu.sprite.png. And I have the module "home.page". When you click the "Download menu" button on the home page, I want the menu menu.css and menu.sprite.png to load before displaying the "menu" of the module. How can I upload images using webpack? Is there any loader that adds the img tag to the page and then uses the onload event for this image?
source
share