优化依赖配置,调整构建和样式设置

This commit is contained in:
wangqiao
2025-09-01 15:27:52 +08:00
parent cb56f9b7ba
commit 2c2e6f600b
4 changed files with 10 additions and 4 deletions

View File

@ -50,7 +50,7 @@ export default defineNuxtConfig({
}, },
}, },
optimizeDeps: { optimizeDeps: {
include: ['naive-ui'], include: ['element-plus','unocss'], // 预构建依赖项
}, },
// 生产环境构建优化 // 生产环境构建优化
build: { build: {
@ -137,7 +137,7 @@ export default defineNuxtConfig({
}, },
build: { build: {
transpile: ['vueuc', '@css-render/vue3-ssr', '@tinymce/tinymce-vue', 'tinymce'], transpile: process.env.NODE_ENV === 'production' ? ['lodash'] : [],
}, },
plugins: [ plugins: [
// 在这里引入插件 // 在这里引入插件

View File

@ -16,6 +16,7 @@
"@wangeditor/editor-for-vue": "^5.1.12", "@wangeditor/editor-for-vue": "^5.1.12",
"decimal.js": "^10.6.0", "decimal.js": "^10.6.0",
"echarts": "^6.0.0", "echarts": "^6.0.0",
"lodash": "^4.17.21",
"mqtt": "^5.14.0", "mqtt": "^5.14.0",
"nuxt": "^3.18.1", "nuxt": "^3.18.1",
"pdfjs-dist": "^5.4.54", "pdfjs-dist": "^5.4.54",

View File

@ -1,6 +1,6 @@
<template> <template>
<KlNavTab /> <KlNavTab />
<div class="ma-auto w-[1198px] flex justify-between"> <div class="mx-auto w-[1198px] flex justify-between">
<div <div
class="left mt-[25px] box-border h-[370px] w-[260px] border border-[#EEEEEE] rounded-[4px] border-solid bg-[#FFFFFF] text-[15px] text-[#333333] font-medium" class="left mt-[25px] box-border h-[370px] w-[260px] border border-[#EEEEEE] rounded-[4px] border-solid bg-[#FFFFFF] text-[15px] text-[#333333] font-medium"
> >

View File

@ -4818,11 +4818,16 @@ lodash.uniq@^4.5.0:
resolved "https://registry.npmmirror.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz" resolved "https://registry.npmmirror.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz"
integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ== integrity sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==
lodash@^4.17.15, lodash@^4.17.21: lodash@^4.17.15:
version "4.17.21" version "4.17.21"
resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz" resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmmirror.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
logform@^2.7.0: logform@^2.7.0:
version "2.7.0" version "2.7.0"
resolved "https://registry.npmmirror.com/logform/-/logform-2.7.0.tgz" resolved "https://registry.npmmirror.com/logform/-/logform-2.7.0.tgz"