91 lines
1.7 KiB
TypeScript
91 lines
1.7 KiB
TypeScript
// https://v3.nuxtjs.org/api/configuration/nuxt.config
|
|
export default defineNuxtConfig({
|
|
ssr: false,
|
|
modules: [
|
|
'@myturborepo/ui',
|
|
'@nuxt/content',
|
|
'@nuxtjs/tailwindcss',
|
|
'@nuxtjs/color-mode',
|
|
'@vue-macros/nuxt',
|
|
'@vueuse/nuxt',
|
|
[
|
|
'@pinia/nuxt',
|
|
{
|
|
autoImports: ['defineStore', 'acceptHMRUpdate'],
|
|
},
|
|
],
|
|
'@pinia-plugin-persistedstate/nuxt',
|
|
],
|
|
css: [
|
|
'@/assets/css/tailwind.css',
|
|
// 'style.css',
|
|
// '@myturborepo/ui/assets/css/tailwind.css',
|
|
],
|
|
imports: {
|
|
dirs: ['api', 'utils/**/*'],
|
|
presets: [{
|
|
from: 'zod',
|
|
imports: ['z', {
|
|
name: 'infer',
|
|
as: 'ZodInfer',
|
|
type: true,
|
|
}],
|
|
}, {
|
|
from: 'vue-sonner',
|
|
imports: ['toast'],
|
|
}, {
|
|
from: 'vue-waterfall-plugin-next',
|
|
imports: ['LazyImg', 'Waterfall'],
|
|
}, {
|
|
from: '@iconify/vue',
|
|
imports: ['Icon'],
|
|
},
|
|
{
|
|
from: 'vue3-seamless-scroll',
|
|
imports: ['Vue3SeamlessScroll '],
|
|
}],
|
|
},
|
|
|
|
components: [
|
|
{
|
|
path: '~/components',
|
|
// pathPrefix: false
|
|
},
|
|
{
|
|
path: '~/components/common',
|
|
// pathPrefix: false
|
|
},
|
|
],
|
|
pinia: {
|
|
storesDirs: ['composables/stores'],
|
|
},
|
|
colorMode: {
|
|
classSuffix: '',
|
|
preference: 'dark',
|
|
},
|
|
content: {
|
|
api: {
|
|
baseURL: '/content_api',
|
|
},
|
|
},
|
|
devtools: {
|
|
enabled: true,
|
|
},
|
|
nitro: {
|
|
devProxy: {
|
|
'/api': {
|
|
target: 'http://user.jwanfs.beijing.3000y.store/api',
|
|
// target: 'http://ocloud.ihep.ac.cn:18000/api', // 这里是接口地址
|
|
changeOrigin: true,
|
|
prependPath: true,
|
|
|
|
},
|
|
},
|
|
esbuild: {
|
|
options: {
|
|
target: 'esnext',
|
|
},
|
|
},
|
|
},
|
|
})
|