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
javascript angularjs webpack


source to share


No one has answered this question yet

Check out similar questions:

1203
NPM vs. Bower vs. Browserify vs. Gulp vs. Grunt vs. Webpack
282
Managing jQuery plugin dependency in webpack
126
How can I bundle vendor scripts separately and require them as needed using Webpack?
6
Handling configuration files with webpack
3
How to export JSON files as separate chunks in webpack?
1
How do I split code with KnockoutJS and Webpack?
1
Webpack and file loader for static images in Angular
0
Using webpack-dev-server 3 with parallel webpack
0
How do I avoid calling outdated chunks with webpack and workbox?
0
How to fix HTML file comments that are not ignored by Webpack Dev Server?



All Articles
Loading...
X
Show
Funny
Dev
Pics