mirror of
https://github.com/RhenCloud/Cloud-Home.git
synced 2026-01-22 17:39:07 +08:00
refactor:删除已弃用的组件和样式,迁移到 Tailwind CSS
- 改进项目页面、网站页面、友链页面 - 从 styles.css 中移除全局样式。 - 添加 tailwind.config.ts 以配置 Tailwind CSS。 - 更新 tsconfig.json,加入 Vue 组件的新路径映射。
This commit is contained in:
@@ -1,22 +1,57 @@
|
||||
import { defineNuxtConfig } from "nuxt/config";
|
||||
import siteConfig from "./src/config/siteConfig";
|
||||
import siteConfig from "./app/config/siteConfig";
|
||||
import tailwindcss from "@tailwindcss/vite";
|
||||
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: "2025-12-12",
|
||||
srcDir: "src/",
|
||||
css: ["~/styles.css"],
|
||||
srcDir: "app/",
|
||||
// 禁用 Vue Router 的非关键警告
|
||||
vue: {
|
||||
compilerOptions: {
|
||||
isCustomElement: (tag) => tag.startsWith("ion-"),
|
||||
},
|
||||
},
|
||||
// Tailwind CSS 集成
|
||||
css: ["~/styles.global.css"],
|
||||
vite: {
|
||||
plugins: [tailwindcss()],
|
||||
},
|
||||
app: {
|
||||
head: {
|
||||
title: siteConfig.siteMeta.title,
|
||||
link: [{ rel: "icon", href: siteConfig.siteMeta.icon }],
|
||||
link: [
|
||||
{ rel: "icon", href: siteConfig.siteMeta.icon },
|
||||
// Font Awesome CDN 预加载和优化
|
||||
{
|
||||
rel: "preload",
|
||||
as: "style",
|
||||
href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css",
|
||||
crossorigin: "anonymous",
|
||||
},
|
||||
{
|
||||
rel: "preload",
|
||||
as: "font",
|
||||
href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-solid-900.woff2",
|
||||
type: "font/woff2",
|
||||
crossorigin: "anonymous",
|
||||
},
|
||||
{
|
||||
rel: "preload",
|
||||
as: "font",
|
||||
href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/webfonts/fa-brands-400.woff2",
|
||||
type: "font/woff2",
|
||||
crossorigin: "anonymous",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// nitro: {
|
||||
// prerender: {
|
||||
// crawlLinks: true,
|
||||
// routes: ["/sitemap.xml", "/rss.xml"],
|
||||
// },
|
||||
// },
|
||||
nitro: {
|
||||
prerender: {
|
||||
crawlLinks: true,
|
||||
// routes: ["/sitemap.xml", "/rss.xml"],
|
||||
},
|
||||
minify: true,
|
||||
},
|
||||
runtimeConfig: {
|
||||
smtpHost: process.env.SMTP_HOST ?? "",
|
||||
smtpPort: Number(process.env.SMTP_PORT ?? 465),
|
||||
|
||||
Reference in New Issue
Block a user