You cannot use vendor extract with this method, it's one or the other. You can extract your own vendor files with this method in a more robust manner.
{
"@babel/plugin-syntax-dynamic-import": "^7.2"
}
mix.babelConfig({
plugins: ['@babel/plugin-syntax-dynamic-import'],
})
const initEcho = async () =>{
const imported = await import(/*webpackChunkName:"broadcasting"*/"./EchoService")
imported.default
}
const routes = [
{
name: 'account.edit', path: '/account/edit', meta: {middleware: ['auth']},
component: () => import(/*webpackChunkName:"account"*/"@page/Account/Edit"),
}
]