惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
有赞技术团队
有赞技术团队
J
Java Code Geeks
H
Hackread – Cybersecurity News, Data Breaches, AI and More
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Hugging Face - Blog
Hugging Face - Blog
人人都是产品经理
人人都是产品经理
酷 壳 – CoolShell
酷 壳 – CoolShell
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
C
Check Point Blog
博客园 - 【当耐特】
The GitHub Blog
The GitHub Blog
Recent Announcements
Recent Announcements
The Cloudflare Blog
Microsoft Azure Blog
Microsoft Azure Blog
腾讯CDC
Vercel News
Vercel News
IT之家
IT之家
MyScale Blog
MyScale Blog
博客园_首页
Martin Fowler
Martin Fowler
WordPress大学
WordPress大学
罗磊的独立博客

Netlify Changelog

Gemini 3.5 Flash now available in Agent Runners 4 Nuxt CVEs: what Netlify users need to know Gemini 3.5 Flash now available in AI Gateway Agent Runners workflow improvements Next.js & React security release (May 2026): what to know Block project transfers out of your team Gemini 3.1 Flash-Lite now available in AI Gateway OpenAI GPT-5.5 Instant now available in AI Gateway New `netlify logs` CLI command Deploy to Netlify with Stripe Projects Netlify Database is now generally available OpenAI GPT-5.5 and GPT-5.5 Pro in AI Gateway & Agent Runners Rename an agent run GPT Image 2 now available in AI Gateway New frontend-design skill for Agent Runners Claude Opus 4.7 now available in AI Gateway and Agent Runners Pricing updates for Credit-based plans New sorting and filter controls on the Members page Netlify Database GA coming soon, no new databases for now Deploy logs streaming is now faster Netlify CLI adds prompt-based creation and anonymous deploys Deploy from Codex with the Netlify Plugin Hydrogen with React Router 7 now supported on Netlify Monitor credit usage by day Invoices for Enterprise Available on the Billing Page AI app development on production infrastructure with Netlify Introducing Prompt Templates OpenAI GPT-5.4 Nano and GPT-5.4 Mini in AI Gateway Change your pricing plan Internal Builder Role & Project Access Controls
Upgrade to Get Latest Features for Netlify Lighthouse Plu...
Nahrin Jalal · 2022-11-03 · via Netlify Changelog

The Netlify Lighthouse Integration brings the popular Google Lighthouse auditing tool directly to your deploys. With the plugin installed, you get access to a full report each time you deploy your site that tells you how to improve your sites performance, accessibility, SEO, and more. You can install the plugin for your site from the Integrations Hub now with a one-click install or read more in the plugin README on how to configure it. In the latest release, we added some new features that allows you more control over what happens based on the reports. Specifying sub directories for reports, failing builds based on scores, and setting the type of experience are custom settings that give you more control. By default, the plugin requires no extra configuration. If you don’t need to configure the plugin and just want to upgrade, skip to the “Upgrade existing plugin” section.

Features in Latest Major Release 4.0

By default, the plugin will serve and audit only the build directory of the site, auditing the index.html file. With this new release, you now have more control over how directories are audited with updated configuration options. Previously, the path option would limit the audit to only the directory and/or files specified by that property and any assets outside the directory would not be reachable. With the latest change, the path option audits directories and files specified in conjunction with the build directory and all assets are reachable.

Only Serve a Sub Directory

To specify a sub directory to only audit, without reaching outside of it, there is a new serveDir option added to the netlify.toml configuration. This allows you to specify a sub directory to only be audited rather than the build directory. The path option will still allow you to run audits on specific paths, but will also run audits on the build directory.

[[plugins]]

package = "@netlify/plugin-lighthouse"

[[plugins.inputs.audits]]

path = "about/contact.html" # to audit contact.html file rather than the index.html in a sub path of the build directory

[[plugins.inputs.audits]]

path = "about" # to audit the index.html file in a sub path of the build directory

[[plugins.inputs.audits]]

serveDir = "about" # to serve only a sub directory of the build directory for an audit

# about/index.html will be audited, and files outside of this directory will not be served

Other new Features

Fail Builds When a Score isn’t Met

Wouldn’t it be nice to make sure your site always meets a certain standard? The Lighthouse plugin allows you to fail your builds if your Lighthouse scores fall below a specified score threshold in the netlify.toml configuration. Set the threshold based on performance, accessibility, best-practices, seo, or pwa.

[[plugins]]

package = "@netlify/plugin-lighthouse"

[plugins.inputs.thresholds]

performance = 0.9

accessibility = 1.0

best-practices = 0.9

seo = 0.8

pwa = 0.5

Set Locale and Language for the Report

Lighthouse results are generated in English by default, but you can return results in other languages by including the language code from any Lighthouse-supported locale in your netlify.toml file.

💡 Example to generate Lighthouse results in Spanish

[[plugins]]

package = "@netlify/plugin-lighthouse"

[plugins.inputs.settings]

locale = "es" # generates Lighthouse reports in Español

Run Lighthouse Audits for Desktop

By default, Lighthouse runs audits for the mobile device experience, but can be configured to run the desktop version. You can leave the configuration off to get the mobile-first experience or set it for desktop, there is no option for running both. You can optionally run Lighthouse audits for the desktop experience by including preset = "desktop" in your netlify.toml file:

[[plugins]]

package = "@netlify/plugin-lighthouse"

[plugins.inputs.settings]

preset = "desktop" # Optionally run Lighthouse using a desktop configuration

Then to return to running Lighthouse audits for the mobile-first experience, just remove the line preset = "desktop" and new builds will run with mobile-first experience.

To get access to all of the new features you’ll need to have the latest version of the Lighthouse Build Plugin. Before anything else, you’ll want to make sure you have a site deploying to Netlify. You can get started for free and still see your Lighthouse reports!

Install the Lighthouse Plugin

If you don’t currently have a site with the plugin already installed, head over to the integrations page to add the plugin to your existing site.

  • Click on the Add build plugin button.

    Lighthouse integration Page with add build plugin button on right

  • Search for and select the site you want to add the plugin on.

    Install Lighthouse plugin to Netlify site with search bar for sites

  • And that’s it, on your next deploy you can see the Lighthouse scores right in your deploy page. Also, click “View Lighthouse report” under the scores to see the full report.

    Deploy Page

    Published deploy page with Lighthouse scores visible and a view lighthouse report link below

    View Full Report

    Full opened Lighthouse report

Update existing Plugin

If you are already running an older version of the plugin on your site, you’ll need to upgrade to the latest version. You can view the latest version under releases in the GitHub repository.

Update the Plugin through the Site Settings

The Lighthouse Plugin can be upgraded directly in the settings of a site it is currently installed on in the Netlify app.

  • Head to the “Site settings” and then “Plugins” for the site you are running the plugin on. You should see if a update is available directly in the UI.

    Site settings - Plugins page with Installed plugins Lighthouse and Update available

  • Click “Change version” and select the release you want to update to. Then click the “Change version” button on the display to update to the version selected.

    Version 4 (latest release) and Change version button

💡 If you have the Lighthouse plugin installed in your package.json file, the plugin will need to be updated manually with your package manager. You can also see in the deploy logs if you are running an outdated version.

Deploy logs location where it states that there is a new version and to upgrade the plugin in the package.json file

Update the Plugin with your Package Manager

If you have the plugin installed locally in your package.json file, you can update the plugin using your package manager like the following:

# npm

npm update @netlify/plugin-lighthouse@latest

# yarn

yarn upgrade @netlify/plugin-lighthouse@latest

#pnpm

pnpm upgrade @netlify/plugin-lighthouse@latest

Feel the Power

Now the power is in your hands. Start configuring the Netlify Lighthouse plugin to what you need for your site today. Make sure those accessibility issues don’t make it into production by failing builds based on the score. Set the language you prefer to receive the reports in. Or choose to run the report based on desktop rather than a mobile-first environment. Looking for more ways to power up your builds? Check out more Build Plugins and see what’s possible or even create your own custom build plugin to fit your needs!