nuxt.config.ts
2.0 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
// 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'
],
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 导航平台',
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:'robots', content:'max-image-preview:large'}
],
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: []
}
})