New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@module-federation/bridge-vue3

Package Overview
Dependencies
Maintainers
0
Versions
369
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@module-federation/bridge-vue3 - npm Package Compare versions

Comparing version 0.0.0-next-20240822063818 to 0.0.0-next-20240822090000

public/vite.svg

13

CHANGELOG.md
# @module-federation/bridge-vue3
## 0.0.0-next-20240822063818
## 0.0.0-next-20240822090000
### Patch Changes
- @module-federation/bridge-shared@0.0.0-next-20240822063818
- 3082116: feat: support module isolated reported
- @module-federation/bridge-shared@0.0.0-next-20240822090000
## 0.5.0
### Patch Changes
- 49d6135: feat(@module-federation/bridge): enhance Bridge capabilities and fix some issues
- Updated dependencies [49d6135]
- @module-federation/bridge-shared@0.5.0
## 0.4.0

@@ -18,0 +11,0 @@

{
"name": "@module-federation/bridge-vue3",
"author": "zhouxiao <codingzx@gmail.com>",
"version": "0.0.0-next-20240822063818",
"version": "0.0.0-next-20240822090000",
"publishConfig": {

@@ -9,17 +9,5 @@ "access": "public"

"type": "module",
"main": "./dist/index.cjs.js",
"main": "./dist/index.umd.js",
"module": "./dist/index.es.js",
"types": "./dist/index.d.ts",
"files": [
"dist/",
"src/",
"CHANGELOG.md",
"LICENSE",
"package.json",
"project.json",
"README.md",
"tsconfig.json",
"tsconfig.node.json",
"vite.config.ts"
],
"peerDependencies": {

@@ -30,3 +18,3 @@ "vue": "=3",

"dependencies": {
"@module-federation/bridge-shared": "0.0.0-next-20240822063818"
"@module-federation/bridge-shared": "0.0.0-next-20240822090000"
},

@@ -33,0 +21,0 @@ "devDependencies": {

@@ -7,48 +7,57 @@ import * as Vue from 'vue';

declare const __APP_VERSION__: string;
interface Provider {
__APP_VERSION__: string;
render(info: RenderFnParams): void;
destroy(info: { dom: HTMLElement }): void;
}
export function createBridgeComponent(bridgeInfo: any) {
let provider: Provider;
const rootMap = new Map();
return () => {
return {
__APP_VERSION__,
render(info: RenderFnParams) {
LoggerInstance.log(`createBridgeComponent render Info`, info);
const app = Vue.createApp(bridgeInfo.rootComponent);
rootMap.set(info.dom, app);
const appOptions = bridgeInfo.appOptions({
basename: info.basename,
memoryRoute: info.memoryRoute,
});
if (!provider) {
provider = {
__APP_VERSION__,
render(info: RenderFnParams) {
LoggerInstance.log(`createBridgeComponent render Info`, info);
const app = Vue.createApp(bridgeInfo.rootComponent);
rootMap.set(info.dom, app);
const appOptions = bridgeInfo.appOptions({
basename: info.basename,
memoryRoute: info.memoryRoute,
});
const history = info.memoryRoute
? VueRouter.createMemoryHistory(info.basename)
: VueRouter.createWebHistory(info.basename);
const router = VueRouter.createRouter({
...appOptions.router.options,
history,
routes: appOptions.router.getRoutes(),
});
const history = info.memoryRoute
? VueRouter.createMemoryHistory(info.basename)
: VueRouter.createWebHistory(info.basename);
const router = VueRouter.createRouter({
...appOptions.router.options,
history,
routes: appOptions.router.getRoutes(),
});
LoggerInstance.log(`createBridgeComponent render router info>>>`, {
name: info.moduleName,
router,
});
// memory route Initializes the route
if (info.memoryRoute) {
router.push(info.memoryRoute.entryPath).then(() => {
LoggerInstance.log(`createBridgeComponent render router info>>>`, {
name: info.name,
router,
});
// memory route Initializes the route
if (info.memoryRoute) {
router.push(info.memoryRoute.entryPath).then(() => {
app.use(router);
app.mount(info.dom);
});
} else {
app.use(router);
app.mount(info.dom);
});
} else {
app.use(router);
app.mount(info.dom);
}
},
destroy(info: { dom: HTMLElement }) {
LoggerInstance.log(`createBridgeComponent destroy Info`, info);
const root = rootMap.get(info?.dom);
root?.unmount();
},
};
}
},
destroy(info: { dom: HTMLElement }) {
LoggerInstance.log(`createBridgeComponent destroy Info`, info);
const root = rootMap.get(info?.dom);
root?.unmount();
},
};
}
return provider;
};
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc