WebIndex/nuxt.config.ts
2025-01-13 21:22:28 +08:00

67 lines
1.6 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// https://nuxt.com/docs/api/configuration/nuxt-config
// see https://blog.csdn.net/m0_53022813/article/details/137379480
import eslintPlugin from "vite-plugin-eslint";
export default defineNuxtConfig({
compatibilityDate: '2024-04-03',
devtools: { enabled: true },
modules: ['@pinia/nuxt', '@pinia-plugin-persistedstate/nuxt', '@nuxt/image', '@nuxt/eslint'],
app: {
head: {
title: 'CANTYONION.SITE',
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ name: 'charset', content: 'utf-8' },
{ name: 'keywords', content: 'cantyonion, onion, 洋葱, 博客, 学习, 主页, index' },
{ name: 'description', content: 'cantyonion的超级基地进来看看吧' },
],
link: [
{ rel: 'icon', href: '/favicon.png' },
]
}
},
components: true,
css: [
'@fortawesome/fontawesome-svg-core/styles.css',
'github-markdown-css/github-markdown-light.css',
'~/assets/css/main.scss'
],
postcss: {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
},
build: {
transpile: ['@fortawesome/vue-fontawesome', 'vue3-typed-js', 'pinia-plugin-persistedstate']
},
vite: {
plugins: [
eslintPlugin({
include: ['**/*.ts', '**/*.vue']
})
],
css: {
preprocessorOptions: {
scss: {
api: 'modern-compiler' // or "modern"
}
}
},
},
runtimeConfig: {
public: {
gitApiKey: 'fb8aec429ea7d0a36f7238dbffda9d2d66c7b045',
baseURL: 'https://cantyonion.site'
}
},
devServer: {
host: '0.0.0.0'
},
eslint: {
config: {
stylistic: true
}
}
})