-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnuxt.config.ts
79 lines (76 loc) · 1.95 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
74
75
76
77
78
79
import type { NuxtConfig } from '@nuxt/types'
import appConfig from './app.config'
const config: NuxtConfig = {
build: {
transpile: [/^element-ui/],
},
buildModules: [
'@nuxtjs/composition-api/module', // Nuxt Composition-Api
'@nuxt/typescript-build',
// https://go.nuxtjs.dev/typescript
// https://go.nuxtjs.dev/stylelint
'@nuxtjs/stylelint-module',
],
css: [
'element-ui/lib/theme-chalk/index.css',
'~/assets/styles/reset.scss',
'~/assets/styles/global.scss',
'~/assets/styles/ele-ui.scss',
'~/node_modules/highlight.js/styles/github.css',
],
// router: {
// middleware: ['auth'],
// },
env: {},
components: true,
head: {
title: '前端厚说',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'A boilerplate to start a Nuxt+TS project quickly',
},
{ hid: 'ebook-home referrer', name: 'referrer', content: 'never' },
],
link: [],
},
loading: { color: '#0c64c1' },
modules: [
'@nuxtjs/axios',
'@nuxtjs/proxy',
'cookie-universal-nuxt',
'@nuxtjs/markdownit',
],
markdownit: {
preset: 'default',
linkify: true,
breaks: true,
use: [
'markdown-it-div',
'markdown-it-highlightjs',
'markdown-it-mark',
'markdown-it-deflist',
],
runtime: true,
},
proxy: [
// '/api/v1':{},
],
publicRuntimeConfig: {
axios: {
// baseURL: 'http://101.201.148.180:3009/api/v1/', // Used as fallback if no runtime config is provided
baseURL: `http://127.0.0.1:${appConfig.port}/api/v1/`, // Used as fallback if no runtime config is provided
},
},
plugins: [
'~/plugins/axios.ts',
'~/plugins/element-ui',
'~/plugins/highlight.js',
{ src: '~/plugins/bus.js', ssr: false },
{ src: '@/plugins/vue-mavon-editor', ssr: false },
],
}
export default config