initial commit
This commit is contained in:
@@ -0,0 +1,99 @@
|
||||
// https://v3.nuxtjs.org/docs/directory-structure/nuxt.config
|
||||
export default defineNuxtConfig({
|
||||
modules: [
|
||||
'@nuxt/eslint',
|
||||
'@vueuse/nuxt',
|
||||
'@unocss/nuxt',
|
||||
'@pinia/nuxt',
|
||||
'@element-plus/nuxt',
|
||||
'@nuxtjs/color-mode',
|
||||
'nuxt-icons'
|
||||
],
|
||||
|
||||
devtools: {
|
||||
enabled: true,
|
||||
},
|
||||
|
||||
app: {
|
||||
head: {
|
||||
title: 'Element Plus + Nuxt 4',
|
||||
meta: [
|
||||
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||
{
|
||||
name: 'description',
|
||||
content: 'ElementPlus + Nuxt3',
|
||||
},
|
||||
],
|
||||
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
|
||||
}
|
||||
},
|
||||
|
||||
// css
|
||||
css: [
|
||||
'@unocss/reset/tailwind.css',
|
||||
'~/assets/scss/index.scss'
|
||||
],
|
||||
|
||||
// vueuse
|
||||
vueuse: {
|
||||
ssrHandlers: true,
|
||||
},
|
||||
|
||||
// colorMode
|
||||
colorMode: {
|
||||
classSuffix: '',
|
||||
},
|
||||
|
||||
future: {
|
||||
compatibilityVersion: 4,
|
||||
},
|
||||
|
||||
experimental: {
|
||||
// when using generate, payload js assets included in sw precache manifest
|
||||
// but missing on offline, disabling extraction it until fixed
|
||||
payloadExtraction: false,
|
||||
renderJsonPayloads: true,
|
||||
typedPages: true,
|
||||
},
|
||||
|
||||
compatibilityDate: '2024-08-14',
|
||||
|
||||
nitro: {
|
||||
esbuild: {
|
||||
options: {
|
||||
target: 'esnext',
|
||||
},
|
||||
},
|
||||
prerender: {
|
||||
crawlLinks: false,
|
||||
routes: ['/'],
|
||||
ignore: ['/hi'],
|
||||
},
|
||||
},
|
||||
|
||||
vite: {
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
additionalData: `@use "@/assets/scss/element/index.scss" as element;`,
|
||||
},
|
||||
},
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1",
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, "/api"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
elementPlus: {
|
||||
icon: 'ElIcon',
|
||||
importStyle: 'scss',
|
||||
themes: ['dark'],
|
||||
},
|
||||
ssr: false,
|
||||
})
|
||||
Reference in New Issue
Block a user