PC-mj/nuxt.config.ts
DESKTOP-RQ919RC\Pc 205252739c build: 更新构建配置优化输出文件结构
修改nuxt配置关闭preserveModules以减少构建文件数量
调整package.json脚本简化构建流程
更新构建输出文件结构,清理旧文件并生成新文件
2025-07-08 17:03:08 +08:00

57 lines
1.7 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
vite: {
$server: {
build: {
rollupOptions: {
output: {
preserveModules: false,
},
},
},
},
},
optimizeDeps: {
include: ["dayjs"],
},
ssr: true,
devtools: { enabled: true },
modules: ["@element-plus/nuxt"],
app: {
head: {
link: [{ rel: "stylesheet", href: "//bbs.gter.net/data/cache/style_2_common.css?Z62" }],
script: [
{
src: "//bbs.gter.net/static/js/common.js",
body: true,
},
{
innerHTML: `
window.userInfoWin = {}
STYLEID = "2";
STATICURL = "static/";
IMGDIR = "https://bbs.gter.net/template/archy_plt8/image";
VERHASH = "Z62";
charset = "gbk";
discuz_uid = "0";
cookiepre = "4B5x_c0ae_";
cookiedomain = "gter.net";
cookiepath = "/";
showusercard = "1";
attackevasive = "0";
disallowfloat = "";
creditnotice = ",";
defaultstyle = "";
REPORTURL = "aHR0cDovL2Jicy5ndGVyLm5ldC9mb3J1bS5waHA/dGlkPTI0MDYzNTYmZ290bz1sYXN0cG9zdA==";
SITEURL = "https://ask.gter.net/";
JSPATH = "static/js/";`,
type: "text/javascript",
},
],
},
},
compatibilityDate: "2025-02-19",
});