I'm trying to use Webpack's code splitting feature to decrease load times on my application, but I am struggling to get this to work. There are no errors in the console, and the file is being loaded in the network tab. However, the Vue component doesn't display on the screen. When inspecting the element in Chrome DevTools, I see <!----->, which indicates that the component is being loaded, but not shown for some reason.
I've tried toying around with the settings in Laravel Mix (i.e. renaming the chunks and changing the destination folder), but nothing seems to resolve the problem.
This is how I am trying to import the additional components:
let todoList = () => {
import( '../../components/dashboard/todoList' );
}
export default {
components: {
todoList
}
}
I would expect that this would import the component when required. It seems to be referencing the split script, but for some reason the component is not loading. What am I doing wrong here?
This is what I am seeing in the network tab in DevTools.

1.jsand look at the response for it, that's a bundle generated by Webpack. So it likely is loading your component in one of those bundles. Is there any sort of conditional rendering on your component that could be causing it to not render, likev-if?v-if="!isLoading"components: {todoList}