refactor(nuxt.config): 调整配置格式并添加vite服务器设置
- 统一代码缩进和引号风格 - 添加vite服务器构建配置以优化模块处理 - 保持原有功能不变
This commit is contained in:
parent
1ed448042f
commit
5b352f352f
@ -1,8 +1,19 @@
|
|||||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
|
vite: {
|
||||||
|
$server: {
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
output: {
|
||||||
|
preserveModules: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
ssr: true,
|
ssr: true,
|
||||||
components: true,
|
components: true,
|
||||||
buildModules: ['@nuxtjs/composition-api/module'],
|
buildModules: ["@nuxtjs/composition-api/module"],
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
baseUrl: process.env.BASE_URL || "http://localhost:3000",
|
baseUrl: process.env.BASE_URL || "http://localhost:3000",
|
||||||
@ -23,7 +34,7 @@ export default defineNuxtConfig({
|
|||||||
{ src: "https://app.gter.net/bottom?tpl=footer,popupnotification", body: true },
|
{ src: "https://app.gter.net/bottom?tpl=footer,popupnotification", body: true },
|
||||||
{
|
{
|
||||||
src: "https://bbs.gter.net/static/js/common.js",
|
src: "https://bbs.gter.net/static/js/common.js",
|
||||||
body: true
|
body: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
innerHTML: `
|
innerHTML: `
|
||||||
@ -63,6 +74,6 @@ export default defineNuxtConfig({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
modules: ['@element-plus/nuxt'],
|
modules: ["@element-plus/nuxt"],
|
||||||
compatibilityDate: "2025-03-21",
|
compatibilityDate: "2025-03-21",
|
||||||
})
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user