New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

use-app

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-app

qiankun application register tool

latest
npmnpm
Version
1.30.1
Version published
Maintainers
1
Created
Source

SIMPLE-QK

qiankun提供便捷的组件注册和微应用路由注册

注册微应用

import { QKRegisterApp } from 'simple-qk';

// 注册微应用
const app = QKRegisterApp({
  routes: routesMicroApps,
  config: {
    mode: config.ROUTE_MODE,
    env: env ? 'prod' : 'dev', // 当前环境变量
    devParam: proxyJson().microApps
  },
  action: { // 生命周期
    beforeLoad: async (app: any) => {
      console.log('before load [CONTAINER]', app.name);
    },
    beforeMount: async (app: any) => {
      console.log('before mount [CONTAINER]', app.name);
    }
  }
});

app.start();

Default Component

  • 微应用默认 router-view 默认使用 vue@next 创建
  • 微应用注册 component 必填
import { QKRegisterMicroApp } from 'simple-qk';

// 注册微应用路由
QKRegisterMicroApp({
  option: {
    component: // custom component
    // ...
  }
  // ...
})

Keywords

qiankun

FAQs

Package last updated on 08 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts