-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
73 lines (73 loc) · 1.86 KB
/
nuxt.config.ts
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
export default defineNuxtConfig({
alias: {
assets: '/assets',
public: '/public',
},
nitro: {
preset: 'node-server',
},
typescript: {
typeCheck: true,
},
vite: {
build: {
assetsInlineLimit: 0, // 图片转 base64 编码的阈值
minify: 'terser',
terserOptions: {
compress: {
// 生产环境时移除console.log()
drop_console: true,
drop_debugger: true,
},
},
},
},
app: {
head: {
htmlAttrs: {
lang: 'zh-CN',
},
meta: [
{ charset: 'utf-8' },
{
name: 'viewport',
content:
'width=device-width, initial-scale=1, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, shrink-to-fit=no',
},
{ name: 'baidu-site-verification', content: 'codeva-JXLMMF0sXP' }, // 百度快速收录
{ name: 'referrer', content: 'strict-origin-when-cross-origin' },
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
script: [
{ src: '/baidu-analytics.js' }, // 添加百度分析
],
},
},
routeRules: {
'/three/**': { ssr: false },
'/game/**': { ssr: false },
},
plugins: [],
build: {
transpile: ['three'],
},
modules: ['@element-plus/nuxt', '@nuxtjs/tailwindcss'],
css: ['@/assets/theme/theme.scss'],
tailwindcss: {
cssPath: './assets/css/tailwind.css',
},
runtimeConfig: {
public: {
githubAccessDev: {
clientId: 'Iv1.5999dbc8911f0be3',
clientSecret: 'b217aad003ec30bea365e2f103eee2079f1cad8e',
redirectUrl: 'http://localhost:3000/api/github/auth',
},
githubAccessServe: {
clientId: 'Iv1.07bde629d78e1f2e',
clientSecret: '2f01a4c05d206e7101f1a4ad5c810998c8f36821',
redirectUrl: 'https://blog.mayuan.work/api/github/auth',
},
},
},
});