rasadus01 Absent Member.
Absent Member.

HPE Grommet Bundle Size is too big

I'm using Grommet latest stable version.  Started using it in my development project and I have used the webpack bundle generated for production which is a single JavaScript file that exceeds 1.7 MB.

I’ve added my webpack configuration to optimize the bundle size, please see the details as follows:

webpack: {
    entry: {
      grommet: ["grommet"],
      vendor: ["whatwg-fetch", "grommet/index-icons.js", "react", "react-dom", "moment" , "moment-parseformat"],
      schedulecallback: "./app/index.js"
    output: {
      filename: '[name].bundle.js'
    plugins: [
      new webpack.optimize.CommonsChunkPlugin({name:"commons", filename: "common.bundle.js", minChunks:3})


The former configuration divided the bundle into 4 chunks, below lists the chunks size.

This is still too heavy especially that I have to add my own development code and configuration to develop different use cases UI. The total files size is so big and it is not acceptable by the client to have all those files downloaded at the client side

Is there is any way to reduce and optimize this bundle file size?

1 Reply
Micro Focus Expert
Micro Focus Expert

Re: HPE Grommet Bundle Size is too big


This is HPE Mobile Center forum, not Grommet..

So, you probably need to post it to Grommet forum to get a reply on this one..

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.