I'm using code splitting in vue, and when i run my app in the browser it doesn't find the appropriate chunk file because it doesn't use the absolute path (/js/0.js) but the relative path(js/0.js). It work when i add the publicPath: '/' to the webpackConfig.
In the webpack.mix.js file add:
.webpackConfig({
output: {
chunkFilename: 'js/[name].[chunkhash].js'
},
});
And in the app.js file:
Vue.component('some-component', () => import('./components/SomeComponent.vue'));
Import the app.js, manifest.js in the view and test it.
This may not be related... for me the versioned chunks are put into the public folder when they should be in the public/js folder.
@micbenner Yes, experiencing the same thing. I have specified my output path as public/js in webpack.mix.js, but chunks are placed in public.
related #936
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
This may not be related... for me the versioned chunks are put into the public folder when they should be in the public/js folder.