forked from CooperJiang/online-snippet-editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nuxt.config.ts
80 lines (69 loc) · 1.45 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
80
import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
import path from 'path'
export default defineNuxtConfig({
devtools: { enabled: false },
build: {
transpile: ['vuetify', 'pinia-plugin-persistedstate'],
},
modules: [
"@vueuse/nuxt",
"nuxt-codemirror",
"@nuxtjs/style-resources",
"@nuxt/icon",
"nuxt-lodash",
(_options, nuxt) => {
nuxt.hooks.hook('vite:extendConfig', (config) => {
if (!config.plugins) return;
config.plugins.push(vuetify({ autoImport: true }))
})
},
'@nuxtjs/tailwindcss',
[
'@pinia/nuxt',
{
autoImports: [
['defineStore', 'definePiniaStore'],
],
},
],
'@pinia-plugin-persistedstate/nuxt',
],
vite: {
vue: {
template: {
transformAssetUrls,
},
},
server: {
proxy: {
'/api/v1': {
target: 'http://localhost:8888',
changeOrigin: true
}
}
},
plugins: [
createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), 'assets/svg')]
})
]
},
runtimeConfig: {
isServer: false,
public: {
baseURL: process.env.NUXT_BASE_URL
},
},
tailwindcss: {
configPath: '~/tailwind.config.ts'
},
styleResources: {
less: [
'./assets/styles/global.less'
]
},
css: [
'./assets/styles/global.less',
]
})