resolve callback in your createInertiaApp() configuration, and how you do this is different depending on which bundler you’re using. Using Vite
Vite enables code splitting (or lazy-loading as they call it) by default when using theirimport.meta.glob() function, so simply omit the { eager: true } option, or set it to false, to disable eager loading. Using Webpack
To use code splitting with Webpack, you will first need to enable dynamic imports via a Babel plugin. Let’s install it now..babelrc file in your project with the following configuration: resolve callback in your app’s initialization code to use importinstead of require.