Google Lighthouse -> Prismic Vendor Slowdown website

Hi,

I have run Lighthouse on my Prismic site and learned that the following Prismic vendor scripts slowdown the website:

  • prismic.min.js
  • jquery-2.1.1.min.js

I am assuming that these are needed for previews. Is there a way to disable these in production?

I’m pretty sure the new Prismic script doesn’t use jQuery. Could you tell us which script you are using to include Prismic?

It's discussed here also:

Here is the list of packages that I am using.

{
  "name": "gatsby-starter-default",
  "private": true,
  "description": "A simple starter to get up and developing quickly with Gatsby",
  "version": "0.1.0",
  "author": "Kyle Mathews <mathews.kyle@gmail.com>",
  "dependencies": {
    "autoprefixer": "^9.8.0",
    "gatsby": "^2.22.15",
    "gatsby-image": "^2.4.12",
    "gatsby-plugin-google-tagmanager": "^2.3.10",
    "gatsby-plugin-manifest": "^2.4.9",
    "gatsby-plugin-offline": "^3.2.7",
    "gatsby-plugin-postcss": "^2.3.4",
    "gatsby-plugin-prefetch-google-fonts": "^1.4.3",
    "gatsby-plugin-purgecss": "^5.0.0",
    "gatsby-plugin-react-helmet": "^3.3.2",
    "gatsby-plugin-react-svg": "^3.0.0",
    "gatsby-plugin-sharp": "^2.6.18",
    "gatsby-source-filesystem": "^2.3.8",
    "gatsby-source-prismic-graphql": "^3.6.2",
    "gatsby-transformer-sharp": "^2.5.10",
    "postcss-import": "^12.0.1",
    "prismic-javascript": "^3.0.0",
    "prismic-reactjs": "^1.3.1",
    "prop-types": "^15.7.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-helmet": "^6.0.0",
    "tailwindcss": "^1.4.6",
    "tailwindcss-fluid": "^0.2.0"
  },
  "resolutions": {
    "gatsby-source-graphql-universal": "3.3.0"
  },
  "devDependencies": {
    "dotenv": "^8.2.0",
    "prettier": "2.0.5"
  },
  "keywords": [
    "gatsby"
  ],
  "license": "MIT",
  "scripts": {
    "build": "gatsby build",
    "develop": "gatsby develop",
    "format": "prettier --write \"**/*.{js,jsx,json,md}\"",
    "start": "npm run develop",
    "serve": "gatsby serve",
    "clean": "gatsby clean",
    "test": "echo \"Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/gatsbyjs/gatsby-starter-default"
  },
  "bugs": {
    "url": "https://github.com/gatsbyjs/gatsby/issues"
  }
}
"gatsby-source-prismic-graphql": "^3.6.2",
"prismic-javascript": "^3.0.0",
"prismic-reactjs": "^1.3.1",

Ah, I see … the solution is:

We still have to wait for this pull request to resolve.

1 Like