R
R
roaddd2022-03-06 02:42:08
React
roaddd, 2022-03-06 02:42:08

How to fix google page speed?

6223f51bb4d2f483489927.png
Site on next js
next config:

require("dotenv").config()

module.exports = {
  reactStrictMode: true,
  swcMinify: true,
  compiler: {
    removeConsole: true
  },
  env: {
    API_URL: process.env.API_URL,
    STATIC_URL: process.env.STATIC_URL,
    RESPONSIVE_LAPTOP_MAX_WIDTH: process.env.RESPONSIVE_LAPTOP_MAX_WIDTH,
    RESPONSIVE_TABLET_MAX_WIDTH: process.env.RESPONSIVE_TABLET_MAX_WIDTH,
    RESPONSIVE_MOBILE_MAX_WIDTH: process.env.RESPONSIVE_MOBILE_MAX_WIDTH
  },
  images: {
    domains: process.env.IMAGES_DOMAINS.split(",")
  },
  sassOptions: {
    prependData: `$STATIC_URL: '${process.env.STATIC_URL}';
                  $RESPONSIVE_LAPTOP_MAX_WIDTH: '${process.env.RESPONSIVE_LAPTOP_MAX_WIDTH}px';
                  $RESPONSIVE_TABLET_MAX_WIDTH: '${process.env.RESPONSIVE_TABLET_MAX_WIDTH}px';
                  $RESPONSIVE_MOBILE_MAX_WIDTH: '${process.env.RESPONSIVE_MOBILE_MAX_WIDTH}px';`
  },
  presets: [
    [
      "next/babel",
      {
        "preset-env": {
          useBuiltIns: false,
          targets: {
            esmodules: true,
            browsers: "> 0.25%, not dead"
          }
        }
      }
    ]
  ]
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question