Webpack not loading chunks in kentico properly

Wade Russell asked on April 28, 2021 08:43

On a page we are using VueJs SFCs which are transpiled and chunked by webpack. When loading this page in the page tab in the kentico CMS menu the chunks are not being loaded and the code is not run, but the webpack code is. When I turn off chunking everything loads but as we have multiple vuejs apps this will cause multiple instances of libraries being loaded. Any idea why the chunks aren't loading properly?

Recent Answers


Wade Russell answered on April 28, 2021 09:27

Update: When I load the page window["webpackJsonp"] contains one array. But when I load it in Kentico there are 3 arrays. If I delete the extra arrays when loading in Kentico my code loads.

0 votesVote for this answer Mark as a Correct answer

Wade Russell answered on April 28, 2021 09:47

Update: I managed to fix it by telling webpack to create a separate chunk for runtime code. Not sure why this fixed it though, can anyone explain?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.