From 064d368ae44644ffc4a8bd8b8df07ab70a82f840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BC=96=E7=A0=81=E7=8C=BF?= Date: Thu, 18 Sep 2025 04:40:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9package.json=E7=9A=84?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front-end/app-product/package.json | 5 +++-- front-end/app-product/src/App.tsx | 17 +++++++++++------ front-end/app-product/vite.config.ts | 3 +-- front-end/app-shared/package.json | 5 +++-- front-end/main-app/package.json | 5 +++-- 5 files changed, 21 insertions(+), 14 deletions(-) diff --git a/front-end/app-product/package.json b/front-end/app-product/package.json index c141b73..07cd316 100644 --- a/front-end/app-product/package.json +++ b/front-end/app-product/package.json @@ -7,8 +7,9 @@ "node": "^20.19.0 || >=22.12.0" }, "scripts": { - "dev": "concurrently \"npm run build\" \"npm run serve\"", - "serve": "vite preview --port 1301 --strictPort", + "dev": "vite", + "dep": "concurrently \"npm run build\" \"npm run preview\"", + "preview": "vite preview --port 1301 --strictPort", "build": "vite build --watch", "type-check": "vue-tsc --build" }, diff --git a/front-end/app-product/src/App.tsx b/front-end/app-product/src/App.tsx index 7b17dec..db8b7df 100644 --- a/front-end/app-product/src/App.tsx +++ b/front-end/app-product/src/App.tsx @@ -1,15 +1,20 @@ -import { defineComponent } from 'vue' -import { RouterLink, RouterView } from "vue-router"; +import {defineComponent} from 'vue' export default defineComponent({ setup() { return () => ( <> - {/* 仅作占位,主应用加载联邦模块时不会显示此内容 */}
-

订单联邦模块(独立开发/测试用)

-

此页面仅用于模块单独调试,实际运行时由主应用加载资源

-

单独开发时,可临时引入组件进行本地测试

+

商品-联邦模块

+

此页面仅用于 商品模块 的单独开发和调试,可临时引入组件进行本地测试,实际运行时由 主应用 + 加载本项目代码

+ +

本模块包含的功能:

+ +

) diff --git a/front-end/app-product/vite.config.ts b/front-end/app-product/vite.config.ts index a6cc82a..fa81816 100644 --- a/front-end/app-product/vite.config.ts +++ b/front-end/app-product/vite.config.ts @@ -22,7 +22,7 @@ export default defineConfig({ './ProductRouter': './src/features/product/router/index.ts' // 商品路由 }, shared: { - vue: { generate:false, requiredVersion: '^3.5.18' }, + vue: {generate: false, requiredVersion: '^3.5.18'}, 'vue-router': { generate:false, requiredVersion: '^4.0.6' }, pinia: { generate:false, requiredVersion: '^3.0.3' } } @@ -36,7 +36,6 @@ export default defineConfig({ cssCodeSplit: true, rollupOptions: { output: { - format: 'es', minifyInternalExports: false } } diff --git a/front-end/app-shared/package.json b/front-end/app-shared/package.json index 0ce2f96..3b3d874 100644 --- a/front-end/app-shared/package.json +++ b/front-end/app-shared/package.json @@ -6,8 +6,9 @@ "author": "", "license": "ISC", "scripts": { - "dev": "concurrently \"npm run build\" \"npm run serve\"", - "serve": "vite preview --port 1333 --strictPort", + "dev": "vite", + "dep": "concurrently \"npm run build\" \"npm run preview\"", + "preview": "vite preview --port 1333 --strictPort", "build": "vite build --watch", "type-check": "vue-tsc --build" }, diff --git a/front-end/main-app/package.json b/front-end/main-app/package.json index bafacaf..bc5cc9f 100644 --- a/front-end/main-app/package.json +++ b/front-end/main-app/package.json @@ -7,8 +7,9 @@ "node": "^20.19.0 || >=22.12.0" }, "scripts": { - "dev": "concurrently \"npm run build\" \"npm run serve\"", - "serve": "vite preview --port 1300 --strictPort", + "dev": "vite", + "dep": "concurrently \"npm run build\" \"npm run preview\"", + "preview": "vite preview --port 1300 --strictPort", "build": "vite build --watch", "type-check": "vue-tsc --build" },