Reduce bundle size?



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


  • Admin

    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']
        })
    


  • 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)


Log in to reply
 

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