WebIndex/nuxt.config.ts

68 lines
1.7 KiB
TypeScript
Raw Permalink Normal View History

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