# nuxt3_template **Repository Path**: wupq/nuxt3_template ## Basic Information - **Project Name**: nuxt3_template - **Description**: nuxt3开发官网模板,SSR服务端渲染,完美解决Vue开发页面的SEO问题。 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 5 - **Forks**: 1 - **Created**: 2024-03-21 - **Last Updated**: 2025-03-14 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Nuxt 3 基础包 Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. ## ✏️ 简介 一个支持服务端渲染的前端开发基础包,可以做为需要 SSR 项目的开发基础通用模板,它帮助你解决SPA(单页应用)中的SEO问题,提高页面加载速度,改善用户体验。 Nuxt3 基础包是基于 Nuxt3 构建的,支持了 Vue3+TypeScript+Pinia 和 Vite 等主流技术。 ## 🔖 特性 - Vue3:采用 Vue3 + script setup 最新的 Vue3 组合式 API - Pinia: 传说中的 Vuex5 - Vite:真的很快 - TypeScript:JavaScript 语言的超集 - Sass:选择和 Element Plus 保持一致 - ESlint:代码校验 - Prettier:代码格式化 - 配置说明:各个配置项都有写尽可能详细的文档 ## 📝 目录结构 ``` -| nuxt-template/ ---| .nuxt/ ---| .output/ ---| node_modules/ ---| src/ ------| api/ ------| assets/ ------| components/ ------| composables ------| layouts/ ------| middleware/ ------| pages/ ----------| pc/ ----------| m/ ------| plugins/ ------| store/ ------| app.vue ---| .env.dev ---| .env.test ---| .env.prod ---| .eslintrc ---| .prettierrc ---| nuxt.config.js ---| package.json ---| ...... ``` ## 🚀 开发 以下使用 npm 的命令同样也可以使用 yarn 进行: ``` 配置 1. 先决条件 2. node 版本 16+ 3. npm 版本 7.x 克隆项目 git clone 进入项目目录 cd nuxt-tempalte 安装依赖 npm install 启动服务 npm run dev ``` ## ✔️ 预览 预览测试环境 ``` npm run build:test npm preview ``` # 预览正式环境 ``` npm run build:prod npm preview ``` 📦️ 多环境打包 # 构建测试环境 ``` npm run build:test ``` # 构建正式环境 ``` npm run build:prod ``` 🔧 代码格式检查 ``` npm lint ```