No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Disable code splitting/chunking

    Help
    2
    3
    1501
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vstruhar last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • rstoenescu
        rstoenescu Admin last edited by rstoenescu

        @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.

        1 Reply Last reply Reply Quote 0
        • V
          vstruhar last edited by

          It worked! Thank you very much for your quick response 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post