Disable code splitting/chunking



  • Is there a way to disable code chunking when building quasar app?
    I see that in webpack.base.conf.js the generation of the chunk name is set “chunkFilename: ‘js/[id].[chunkhash].js’”, but even if I remove it the chunks are ganrated, only with different name.


  • Admin

    @vstruhar in router.js just directly import your app’s page/layout components and don’t call load(). Here’s what I mean:

    // /src/router.js
    import MyPage from '.....path-to-my-page.vue....'
    
    // .......
    
    export default new VueRouter({
       // ...,
      routes: [
        { path: '/', component: MyPage }, // instead of component: load()
        // ...
      ]
    })
    
    // ....
    

    What load() does it is makes a chunk for that respective component. Not calling it avoids making a new chunk.



  • It worked! Thank you very much for your quick response :)


Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.