Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eyantra's avatar

Inertia Chunk file path...

Trying Laravel 8 + Inertia Js, I have successfully done inertia set up the client /server side.

When trying to route the Vue component getting ChunkLoadError: Loading chunk.

I have configured the webpackConfig output in webpack file as:

.webpackConfig({ output: { chunkFilename: 'js/[name].js?id=[chunkhash]', } })

Compiling successfully but when hit the route chunkfile path is wrong. http://localhost/js/resources_js_Pages_landing_faq_vue.js ...

How to set the correct path for the chunk files ??

0 likes
2 replies
eyantra's avatar

Resolved, need to put public path in webpackConfig

eyantra's avatar

This is working fine,

but if i change the Route path e.g. Route::get('/profile/team', ....) its giving the not found chunk file.

and if i keep route as Route::get('/team', ....) it's working.

How to map the chunk file path with laravel route

Please or to participate in this conversation.