nuxt.config.ts
3.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: true,
runtimeConfig: {
public: {
baseUrl: process.env.NUXT_BASE_URL,
apiUrl: process.env.NUXT_API_URL,
}
},
devtools: { enabled: false },
modules: [
'@nuxtjs/tailwindcss',
'@element-plus/nuxt'
],
tailwindcss: {
cssPath: '~/assets/css/tailwind.css',
config: {
darkMode: 'class',
content: [
'./components/**/*.{js,vue,ts}',
'./layouts/**/*.vue',
'./pages/**/*.vue',
'./plugins/**/*.{js,ts}',
'./app.vue',
],
theme: {
extend: {},
},
}
},
features: {
inlineStyles: false,
devLogs: false,
},
devServer: {
host: 'localhost',
port: 3666
},
nitro: {
compressPublicAssets: false,
devProxy: {
'/dev-api': {
// target: 'http://192.168.2.15:35273/',
target: 'http://htai.aiboxgo.com/',
changeOrigin: true,
}
},
// 该配置用于服务端请求转发
routeRules: {
'/dev-api/**': {
// proxy: 'http://192.168.2.15:35273/**'
proxy: 'http://htai.aiboxgo.com/**'
},
},
prerender: {
routes: ['/sitemap.xml'],
// 从预渲染中排除 sitemap.xml,让它动态生成
ignore: ['/sitemap.xml']
},
},
css: [
'~/assets/iconfonts/iconfont.css',
],
plugins: [
{ src: '~/assets/iconfonts/iconfont.ts', ssr: false, mode: 'client' }
],
app: {
head: {
title: 'Annie网站 - 优质 AI 工具集合、AI 资源网站、AI 导航平台',
titleTemplate: '%s | Annie网站',
htmlAttrs: {
lang: 'zh-CN'
},
meta: [
{ charset: 'utf-8' },
{ name: "renderer", content: "webkit"},
{ name: "force-rendering", content: "webkit"},
{ "http-equiv":"X-UA-Compatible", content:"IE=edge, chrome=1" },
{ name: 'viewport', content:"width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" },
{ name: 'description', content: 'Annie网站是专业的AI工具导航平台,汇集全网优质AI工具,包含AI写作、AI绘画、AI视频、AI对话、AI代码、AI设计、AI办公等各类AI资源,让你快速找到好用的AI工具。' },
{ name: 'keywords', content: 'AI工具,AI导航,AI资源,AI写作,AI绘画,AI视频,AI对话,ChatGPT,AI代码,AI设计,人工智能工具' },
{ name: 'author', content: 'Annie网站' },
{ name:'robots', content:'index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1'},
{ name: 'googlebot', content: 'index, follow' },
{ name: 'format-detection', content: 'telephone=no' },
{ name: 'referrer', content: 'origin-when-cross-origin' },
{ property: 'og:type', content: 'website' },
{ property: 'og:site_name', content: 'Annie网站' },
{ property: 'og:locale', content: 'zh_CN' },
{ property: 'twitter:card', content: 'summary_large_image' },
{ property: 'twitter:site', content: '@Annie网站' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'canonical', href: 'https://aiboxgo.com/' }
],
script: [{ src: "/js/translate.js"}]
},
rootId: 'annie',
},
build: {
transpile: []
}
})