-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuxt.config.ts
More file actions
53 lines (51 loc) · 1.44 KB
/
nuxt.config.ts
File metadata and controls
53 lines (51 loc) · 1.44 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
import path from 'node:path'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
const lifecycle = process.env.npm_lifecycle_event
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: ['@nuxtjs/tailwindcss', '@element-plus/nuxt', ['@pinia/nuxt', {
autoImports: [
// automatically imports `defineStore`
'defineStore', // import { defineStore } from 'pinia'
// automatically imports `defineStore` as `definePiniaStore`
['defineStore', 'definePiniaStore'], // import { defineStore as definePiniaStore } from 'pinia'
],
}]],
build: {
transpile: lifecycle === 'build' ? ['element-plus'] : [],
},
css: ['~/assets/css/page.css'],
hooks: {
'pages:extend': function (routes) {
routes.push({
path: '/:teamUrl/:projectCode/:sheetCode',
name: 'dataTable',
file: '~/pages/sheetCode/index.vue',
}, {
path: '/access-token',
name: 'accessToken',
file: '~/pages/accessToken/index.vue',
})
},
},
components: true,
vite: {
plugins: [
createSvgIconsPlugin({
iconDirs: [path.resolve(process.cwd(), 'assets/svg')],
}),
],
build: {
chunkSizeWarningLimit: 4096,
rollupOptions: {
output: {},
},
},
},
runtimeConfig: {
public: {
baseUrl: process.env.NUXT_PUBLIC_BASE_URL,
accountUrl: process.env.NUXT_PUBLIC_ACCOUNT_URL,
},
},
})