NuxtVue启动器

nuxt2-lighthouse-boilerplate — Nuxt 启动器模板

作者 alexandrecanijo

基于 Nuxt2 的启动器模板,通过精简配置与 webpack 优化追求 Lighthouse 四项满分,代码集中在 src/ 目录。

看看你的网站会是什么样

浏览真实页面截图,比较内容排版与手机效果。点击下方缩略图切换,放大查看整页细节。

2 个预览视图
桌面端首页1 / 2
桌面端截图首屏预览

由服务器浏览器实际访问页面后截取。

全部页面与视图 2

截图用于了解视觉与布局,交互效果请以实际项目为准。

采集于 2026-10-02查看来源

值得关注的模板亮点

从已有项目资料中,快速了解它的特点。

01

基于 Nuxt-CLI 生成的 Nuxt2 项目结构改造,保留可用的启动器形态

02

关闭部分非必要的 Nuxt 核心功能,减少默认配置带来的冗余

03

加入 HTTP2(在条件允许时)与多项 webpack 优化,针对首屏加载

04

全部代码集中于 src/ 目录,配置与业务代码分离

05

README 提供开发、构建、生产启动、静态生成四类 npm 命令

06

采用 MIT 许可,允许免费使用、修改、商用与分发

模板详细介绍

该模板是一个 Nuxt2 应用启动器,基于 Nuxt-CLI 生成的默认结构改造而来。作者在 README 中说明其目标是提供一个可复用的起点,避免每次新建 Nuxt2 项目时重复配置,并默认就朝 Lighthouse 满分方向调整。

实现方式上,模板关闭了部分默认开启但并非总是需要的 Nuxt 核心功能,加入 HTTP2(在条件允许时)以及若干 webpack 优化,用于改善首屏加载表现。所有业务代码统一放在 src/ 目录下,便于与配置分离。README 列出的命令包括开发、构建、生产启动和静态生成四类。

需要留意的是,README 的 Roadmap 明确列出 Lighthouse-CI、Cypress 端到端测试、i18n、明暗主题、无障碍分析等功能尚未加入,文档也有待完善。因此该模板当前提供的是基础骨架与构建配置,不包含上述扩展能力。仓库采用 MIT 许可,可免费使用、修改、商用和分发,但演示图片、字体、图标等第三方素材需单独核对许可。

NuxtVue启动器

适合你的项目吗?

适用场景

  • 需要快速搭建一个 Nuxt2 项目骨架,不想从零配置构建与优化项
  • 希望以 Lighthouse 四项指标为参考来组织 Nuxt2 的默认配置
  • 作为个人或团队内部 Nuxt2 应用的统一起始模板
  • 用于学习 Nuxt2 中 webpack 优化与核心功能裁剪的配置方式

适合人群

  • 使用 Nuxt2 与 Vue 的前端开发者
  • 需要可复用 Nuxt2 起点的个人或小团队项目
  • 关注首屏加载与 Lighthouse 指标的基础配置参考者

上手与定制指南

结合仓库当前版本的说明,按下面的资料检查内容、配置与运行要求。

  1. 1

    本地需安装 Node.js 以及 Yarn 或 NPM 包管理器

  2. 2

    通过 git clone 获取仓库后进入目录执行 npm install 安装依赖

  3. 3

    使用 npm run dev 在 localhost:3000 启动开发服务器

  4. 4

    构建与部署可使用 npm run build、npm run start 或 npm run generate

  5. 5

    演示图片、字体、图标等第三方素材需按各自许可单独核对,外部托管等服务可能另行收费

查看仓库使用说明

授权与来源资料

使用条件与限制

免费使用 · 保留许可声明

本次收录的是公开仓库中采用 MIT 许可的免费版本;免费范围为该版本代码,不代表外部服务或第三方素材免费。

使用时需要遵守

  • 允许免费使用、修改、商用和分发该版本代码。
  • 分发代码副本或实质性部分时,保留原作者版权声明和完整 MIT 许可声明。
  • 代码按现状提供;担保与责任限制以原许可证及适用法律为准。

额外费用与待核对事项

  • 演示图片、字体、图标及其他第三方素材需按各自许可核对,不能仅凭代码的 MIT 许可判断。
  • 域名、托管、数据库、支付或 AI 等外部服务可能另外收费。
查看原文依据

DeepSeek 根据仓库许可证和 README 整理 ·2026-10-02。结果仅覆盖已读取资料,依赖、图片、字体及后续条款变更以各自原文为准。

项目核对记录与介绍依据

模板资料

来源平台
GitHub
资料与维护参考分
资料一般 · 69 / 100
技术栈
Nuxt · Vue
网站类型
启动器
这个分数如何计算

本站按许可资料(最高30分)、演示链接(12分)、预览图(10分)、Star数(15分)、记录的维护时间(15分)、描述完整度(8分)、功能记录(5分)和分类资料(5分)计算。它不是代码、安全或性能测试,也不是 Google 评分;有链接不代表已实测可用。

这个项目需要核对什么

记录的仓库更新时间
2023-12-26
截图检查日期
2026-10-02

已收录演示链接。请用你的内容与屏幕尺寸检查;有演示不代表表单、认证或支付已经可用。

目录记录的主要技术栈是 Nuxt。请通过依赖清单和锁文件核对实际版本与托管要求。这些说明基于收录资料,不代表代码审计或部署实测。

查看具体选型方法 →

介绍的制作与核对状态

介绍由 AI 辅助整理目录与仓库资料。仓库作者不等于这篇介绍的审核者。

已完成服务器许可规则与 AI 来源核对;未经过人工编辑审核。

查看当时使用的来源资料

SHA-256: f5cccb21ee85c4855df886c590a6213b54675c34d64fefe6b8fd528f1cbadd55

2026-10-02T21:26:46.069Z

来源文件 / 仓库
<div align="center">
  <h1>Nuxt2 with 100 Lighthouse score</h1>
</div>

## What

A starting point and reusable Nuxt2 application, based on the one generated by Nuxt-CLI with all settings already setup up, with performance in mind, to achieve a 100% Lighthouse score.

---

## Why

Generating a fresh setup of a Nuxt2 application is always a tedious process and by default, it won't achieve a good Lighthouse score.
This project aims to speed up the process of starting up an application and trying to get a perfect Lighthouse score, with all the main features a medium/large application should have.

---

## How

By setting up some Nuxt configs, removing all the clutter and still having a viable boilerplate.
The goal is to have with every update a perfect 100 Lighthouse score.

---

## Table of contents

- [Requirements](#requirements)
- [Installation](#installation)
- [Commands](#commands)
- [Features](#features)
- [Roadmap](#roadmap)
- [Google Lighthouse score](#google-lighthouse-score)
- [Licenses](#licenses)
- [Inspiration](#inspiration)
- [Want to contribute?](#want-to-contribute)

---

## Requirements

The only tools you will need installed on your machine are:

- Node.js - [Download and Install Node.js](https://nodejs.org/en/download/)
- a package manager (Yarn or NPM) - [Download and Install Yarn](https://yarnpkg.com/getting-started/install)
  (NPM already comes bundle with Node.js)

---

## Installation

Clone repository and run project locally:

```bash
$ git clone https://github.com/alexandrecanijo/nuxt2-lighthouse-boilerplate.git # Clone project using HTTPS
$ cd nuxt2-lighthouse-boilerplate # Change directory
$ npm install # Install required dependencies
```

---

## Commands

Launch development server at localhost:3000

```
$ npm run dev
```

Build for production

```
$ npm run build
```

Start the production server (after running the build command)

```
$ npm run start
```

Generate a static project

```
$ npm run generate
```

---

## Features

- Disabled core Nuxt features, that should only be enabled when needed
- Enabled HTTP2 (if possible) and added a bunch of webpack optimizations to speed up first page impression
- All code resides on `src/` directory

---

## Roadmap

- Add Lighthouse-CI under Github Actions
- Add Cypress integration and example e2e tests
- Improve documentation
- Add common features, i18n, light/dark theme, accessibility analysis, etc.

---

## Google Lighthouse score

- Performance - 100
- Accessibility - 100
- Best practices - 100
- SEO - 100

---

## Licenses

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

---

## Inspiration

Several articles and repositories inspired me to create this one, but the main goal was to have a starting point, for all my Nuxt apps.
Here are some links that this project is based on:

- https://github.com/larsdouweschuitema-nuxt/nuxt-boilerplate
- https://dev.to/jacobandrewsky/performance-checklist-for-vue-and-nuxt-cog
- https://github.com/harlan-zw/nuxt-webpack-optimisations

---

## Want to Contribute?

Please check out [CONTRIBUTING.md](CONTRIBUTING.md).
反馈内容错误

看看同类模板

对比同技术栈与用途的模板,找到更适合的视觉与内容结构。