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

    Reduce bundle size?

    Framework
    2
    4
    3425
    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.
    • G
      glittle last edited by

      Is there a way to build and use the framework without bundling so much into a single set of files? I’d rather have a number of smaller files that can be cached, served, and updated separately.

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

        You can play with /src/build/webpack.prod.conf.js and remove the vendor chunk config:

        // split vendor js into its own file
            new webpack.optimize.CommonsChunkPlugin({
              name: 'vendor',
              minChunks: function (module, count) {
                // any required modules inside node_modules are extracted to vendor
                return (
                  module.resource &&
                  /\.js$/.test(module.resource) &&
                  module.resource.indexOf(
                    path.join(__dirname, '../node_modules')
                  )
                )
              }
            }),
            // extract webpack runtime and module manifest to its own file in order to
            // prevent vendor hash from being updated whenever app bundle is updated
            new webpack.optimize.CommonsChunkPlugin({
              name: 'manifest',
              chunks: ['vendor']
            })
        
        1 Reply Last reply Reply Quote 0
        • G
          glittle last edited by

          Thanks! I’ll look into that after upgrading to version 12. (As per another thread at http://forum.quasar-framework.org/topic/180/load-roboto-font-from-cdn/5)

          1 Reply Last reply Reply Quote 0
          • G
            glittle last edited by

            I think the build framework should do some of the optimizations found here: https://hackernoon.com/optimising-your-application-bundle-size-with-webpack-e85b00bab579

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