@lemon-fe/vite-plugin-micro-frontend 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/vite-plugin-micro-frontend",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Vite 微前端插件集合,包含路由自动生成、模块联邦、qiankun 集成等功能",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "dist"
33
33
  ],
34
34
  "scripts": {
35
- "build": "rollup -c && cp src/types/modules.d.ts dist/modules.d.ts",
35
+ "build": "rollup -c",
36
36
  "dev": "rollup -c -w",
37
37
  "prepublishOnly": "npm run build"
38
38
  },
@@ -55,7 +55,8 @@
55
55
  "vite": "^4.0.0 || ^5.0.0"
56
56
  },
57
57
  "dependencies": {
58
- "@originjs/vite-plugin-federation": "^1.4.1",
58
+ "@module-federation/dts-plugin": "^0.21.6",
59
+ "@module-federation/vite": "^1.9.4",
59
60
  "chokidar": "^4.0.3",
60
61
  "prettier": "^3.5.3",
61
62
  "vite-plugin-qiankun": "^1.0.15"
@@ -79,5 +80,10 @@
79
80
  "typescript": "^5.2.2",
80
81
  "vite": "^5.4.19",
81
82
  "vite-plugin-css-injected-by-js": "^3.5.2"
83
+ },
84
+ "pnpm": {
85
+ "overrides": {
86
+ "cheerio": "1.0.0-rc.10"
87
+ }
82
88
  }
83
89
  }
package/dist/modules.d.ts DELETED
@@ -1,34 +0,0 @@
1
- /**
2
- * 模块声明文件
3
- * 为项目中使用的模块提供类型声明
4
- */
5
-
6
- declare module "@/routes" {
7
- import { type IRoute } from "@lemon-fe/kits/es/layouts/typings";
8
- export const routers: IRoute[];
9
- }
10
-
11
- declare module "@@/mf" {
12
- import { type ComponentType, type ReactNode } from "react";
13
-
14
- export function getEntryShared<T>(
15
- moduleSpecifier: string,
16
- getData: () => Promise<T>
17
- ): Promise<T>;
18
-
19
- type ExtractProps<T> = T extends ComponentType<infer P> ? P : T;
20
-
21
- export function safeRemoteComponent<T>(options: {
22
- loader?: () => Promise<{ default: ComponentType<ExtractProps<T>> }>;
23
- moduleSpecifier: string;
24
- fallbackComponent: ComponentType<ExtractProps<T>> | ComponentType<object>;
25
- loadingElement: ReactNode | null;
26
- }): ComponentType<ExtractProps<T>>;
27
-
28
- export function createRemoteComponent<T = Record<string, unknown>>(options: {
29
- loader: () => Promise<{ default: ComponentType<ExtractProps<T>> }>;
30
- moduleSpecifier: string;
31
- fallbackComponent: ComponentType<ExtractProps<T>> | ComponentType<object>;
32
- loadingElement: ReactNode | null;
33
- }): ComponentType<ExtractProps<T>>;
34
- }