From 787ccc59ba89bacc075562a161ecf02bc76ebadc Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 24 七月 2026 17:15:53 +0800
Subject: [PATCH] 银川 1.采购申请添加入库状态查询条件

---
 vite.config.ts |   55 +++++++++++++++++++++++++++----------------------------
 1 files changed, 27 insertions(+), 28 deletions(-)

diff --git a/vite.config.ts b/vite.config.ts
index 5e6b6b4..dcf9f5b 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,46 +1,45 @@
+import { resolve } from "node:path";
 import { defineConfig } from "./internal/vite-config/src";
 
 export default defineConfig(async () => {
   return {
     application: {},
     vite: {
+      resolve: {
+        alias: {
+          '@vue-office/pdf': resolve(__dirname, 'node_modules/@vue-office/pdf/lib/v3/vue-office-pdf.mjs'),
+          '@vue-office/docx': resolve(__dirname, 'node_modules/@vue-office/docx/lib/v3/vue-office-docx.mjs'),
+          '@vue-office/excel': resolve(__dirname, 'node_modules/@vue-office/excel/lib/v3/vue-office-excel.mjs'),
+          '@vue-office/excel-css': resolve(__dirname, 'node_modules/@vue-office/excel/lib/v3/index.css'),
+          '@vue-office/pptx': resolve(__dirname, 'node_modules/@vue-office/pptx/lib/v3/vue-office-pptx.mjs'),
+        },
+      },
       oxc: {
         enable: false,
       },
       optimizeDeps: {
-        include: [
-          "vue",
-          "vue-router",
-          "pinia",
-          "ant-design-vue",
-          "dayjs",
-          "@vueuse/core",
-          "axios",
-        ],
-        exclude: [
-          "dhtmlx-gantt",
-          "tinymce",
-          "bpmn-js",
-          "bpmn-js-properties-panel",
-          "video.js",
-        ],
+        include: ["vue", "vue-router", "pinia", "ant-design-vue", "dayjs", "@vueuse/core", "axios", "@vue-office/pdf", "@vue-office/docx", "@vue-office/excel", "@vue-office/pptx"],
+        exclude: ["dhtmlx-gantt", "tinymce", "bpmn-js", "bpmn-js-properties-panel", "video.js"],
       },
       build: {
         rollupOptions: {
           output: {
-            manualChunks: (id) => {
-              if (id.includes('node_modules')) {
-                if (['vue', 'vue-router', 'pinia'].some(dep => id.includes(dep))) {
-                  return 'vendor-vue';
+            manualChunks: id => {
+              if (id.includes("node_modules")) {
+                if (["vue", "vue-router", "pinia"].some(dep => id.includes(dep))) {
+                  return "vendor-vue";
                 }
-                if (['ant-design-vue', '@vueuse/core'].some(dep => id.includes(dep))) {
-                  return 'vendor-ui';
+                if (["ant-design-vue", "@vueuse/core"].some(dep => id.includes(dep))) {
+                  return "vendor-ui";
                 }
-                if (['dayjs', 'axios', '@vee-validate/zod', 'zod'].some(dep => id.includes(dep))) {
-                  return 'vendor-utils';
+                if (["dayjs", "axios", "@vee-validate/zod", "zod"].some(dep => id.includes(dep))) {
+                  return "vendor-utils";
                 }
-                if (['tinymce', '@tinymce/tinymce-vue', '@form-create/ant-design-vue'].some(dep => id.includes(dep))) {
-                  return 'vendor-editor';
+                if (["tinymce", "@tinymce/tinymce-vue", "@form-create/ant-design-vue"].some(dep => id.includes(dep))) {
+                  return "vendor-editor";
+                }
+                if (["@vue-office"].some(dep => id.includes(dep))) {
+                  return "vendor-office-preview";
                 }
               }
             },
@@ -50,12 +49,12 @@
       server: {
         allowedHosts: true,
         watch: {
-          ignored: ['**/node_modules/**', '**/dist/**', '**/.git/**'],
+          ignored: ["**/node_modules/**", "**/dist/**", "**/.git/**"],
         },
         proxy: {
           "/admin-api": {
             changeOrigin: true,
-            rewrite: (path) => path.replace(/^\/admin-api/, ""),
+            rewrite: path => path.replace(/^\/admin-api/, ""),
             target: "http://192.168.0.226:48080/admin-api",
             ws: true,
           },

--
Gitblit v1.9.3