-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.js
108 lines (107 loc) · 2.34 KB
/
nuxt.config.js
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
106
107
108
import { resolve } from 'path';
export default {
target: 'static',
/**
* 允许在访问文件时使用别名访问自定义目录
* 默认的别名,@和~路径<srcDir>,@@和~~路径<rootDir>
* https://zh.nuxtjs.org/docs/2.x/configuration-glossary/configuration-alias
*/
alias: {
'images': resolve(__dirname, "./assets/images"),
'styles': resolve(__dirname, "./assets/styles")
},
/**
* 构建配置
* https://zh.nuxtjs.org/docs/2.x/configuration-glossary/configuration-build
*/
build: {},
/**
* 样式文件管理
* https://zh.nuxtjs.org/docs/2.x/configuration-glossary/configuration-css
*/
css: [
"nprogress/nprogress.css",
"@primer/css/markdown/index.scss",
"~/assets/styles/code-highlight.scss",
"~/assets/styles/colors.scss",
"~/assets/styles/gitalk.scss",
"~/assets/styles/global.scss"
],
/**
* 自动导入组件
* https://zh.nuxtjs.org/docs/2.x/configuration-glossary/configuration-components
*/
components: true,
/**
* 页面头部标签信息
* https://zh.nuxtjs.org/docs/2.x/configuration-glossary/configuration-head
*/
head: {
title: "chenkun8651",
htmlAttrs: {
lang: "zh"
},
meta: [
{
charset: "utf-8"
},
{
name: "viewport",
content: "width=device-width, initial-scale=1"
},
{
name: "description",
hid: "description",
content: "陈坤的博客"
}
],
link: [
{
rel: "icon",
type: "image/x-icon",
href: "/favicon.ico"
}
],
},
/**
* 插件
* https://go.nuxtjs.dev/config-plugins
*/
plugins: [
{
src: "@/plugins/router.ts",
ssr: false
},
],
/**
* 模块
* https://go.nuxtjs.dev/config-modules
*/
modules: [
// https://go.nuxtjs.dev/axios
"@nuxtjs/axios",
"@nuxtjs/dayjs",
],
/**
* 生产模块
* https://go.nuxtjs.dev/config-modules
*/
buildModules: [
// https://go.nuxtjs.dev/typescript
"@nuxt/typescript-build",
"@nuxtjs/tailwindcss",
],
// 环境变量
env: {
GITHUB_TOKEN: process.env.GITHUB_TOKEN,
CLIENT_ID: process.env.CLIENT_ID,
CLIENT_SECRETS: process.env.CLIENT_SECRETS,
},
// axios模块配置
axios: {},
// dayjs模块配置
dayjs: {
locales: ["zh", "en"],
defaultLocale: "zh",
}
};