Processing failed to load chunks of webpack

I am using webpack generating a manifest file which I embed in html. Everything works fine except for a case like this:

Say there an application with these files:

home.component.html
home.component.js
home.controller.js

settings.component.html
settings.component.js
settings.controller.js

      

every component.js file requires a component controller:

module.exports = {
    templateUrl: require("!file-loader!./home.component.html"),
    controller: require("./home.controller")
}

      

Let's say the user just opened the site and only downloaded the home component files (since other files are downloaded on demand).

Let's also assume that I push change to the settings controller to the server and the settings controller is rebuilt and gets a new filename (chunkhash).

This is a problem because the manifest file embedded in the page the user has opened is old and has the old options controller file name and will fail when the application tries to request it.

(Difficult to replicate, the problem might be when modifying and requiring the template file)

What are the possible solutions to this problem?

+3


source to share





All Articles