Code splitting (webpackChunkName)



  • Is there a way to enable ‘webpackChunkName’ for code splitting in quasar config?

    What I’m doing in my routes is basically trying to put everything that goes under /auth route and all of its children into the same bundle:

    export default [
    {
    path: ‘/auth’,
    component: () => import(/* webpackChunkName: “auth” / ‘layouts/auth’),
    children: [{
    path: ‘login’,
    component: () => import(/
    webpackChunkName: “auth” */ ‘components/auth/AuthLogin’)
    }, {
    path: ‘’,
    redirect: ‘login’
    }]
    }
    ]

    After running qusar buiild, I’d expect to see js/auth.41e0cf096add72be2a2e.js bundle created

    Thanks!



  • v 0.15 of course



  • needs:

    1. remove in .babelrc “comments”: false
    2. ChangechunkFilename in quasar.conf.js extendWebpack section - like cfg.output.chunkFilename = cfg.output.chunkFilename.replace('[id]', '[name]-[id]')