Gatsby: Unable to get 100/100 score

Created on 7 May 2019  路  6Comments  路  Source: gatsbyjs/gatsby

I want to get 100/100 score and few things it is showing.

  • Combine multple JS reqests into one.

  • image

Most helpful comment

As @me4502 mentioned, this is advice from pre http/2 days. We recommend using lighthouse scores for performance advice as it is kept up to date and yslow isn't.

All 6 comments

Also, a few files which are generated are very very small. It should be okey to inline them

image

If you're using HTTP2, using multiple smaller scripts can actually be better for performance

@me4502 Yes, we are using http2. But Yslow is still not giving 100/100. I am looking for 100/100 on these sites.
Only last option that, I need to write a plugin which will combine all js into one js file.
image

As @me4502 said I wouldn't worry about Yslow in this case. We're smarter than Yslow and hence know that you can ignore this message. You shouldn't try to do something different if you definitely know better.

@LekoArts @me4502
I am 100% agree. However, I tried with MaxChunk Number is 1 and now I have 100/100 score.

image

gatsby-node.js

const webpack = require(`webpack`);

exports.onCreateWebpackConfig = ({ stage, actions }, options) => {
  console.log('==== Disabling Chunk ====');
  if ((process.env.NODE_ENV === 'production' && stage === 'build-javascript') || options.development) {
    actions.setWebpackConfig({
      plugins: [
        new webpack.optimize.LimitChunkCountPlugin({
          maxChunks: 1
        })
      ]
    });
  }
};

I noticed that the load time also increased.

As @me4502 mentioned, this is advice from pre http/2 days. We recommend using lighthouse scores for performance advice as it is kept up to date and yslow isn't.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

magicly picture magicly  路  3Comments

mikestopcontinues picture mikestopcontinues  路  3Comments

timbrandin picture timbrandin  路  3Comments

andykais picture andykais  路  3Comments

theduke picture theduke  路  3Comments