npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@calibur/mfe-loader

v0.3.0

Published

Why - 当你使用微前端作为开发框架的时候,子应用和父应用之间是完全无依赖耦合的,这样在`ToB`的项目中比较好,但是在`ToC`的项目中 会存在性能问题 - 面对`ToC`的场景,我们可以使用`webpack5`的`Module Federation`来实现,也可以使用统一依赖的微前端方案 - 对于`Module Federation`,它的限制我还不清楚,未来再研究吧 - 对于微前端,可以使用这个包来在开发子包时注入依赖

Downloads

5

Readme

Why

  • 当你使用微前端作为开发框架的时候,子应用和父应用之间是完全无依赖耦合的,这样在ToB的项目中比较好,但是在ToC的项目中 会存在性能问题
  • 面对ToC的场景,我们可以使用webpack5Module Federation来实现,也可以使用统一依赖的微前端方案
  • 对于Module Federation,它的限制我还不清楚,未来再研究吧
  • 对于微前端,可以使用这个包来在开发子包时注入依赖

Usage

yarn add @calibur/mfe-loader

Import

import bootstrap from '@calibur/mfe-loader'

const dependencies = [
  {
    global: 'Vue',
    resource: [
      'https://unpkg.com/vue@next'
    ]
  },
  {
    global: 'ElementPlus',
    resource: [
      'https://unpkg.com/element-plus',
      'https://unpkg.com/element-plus/lib/theme-chalk/index.css',
      'https://unpkg.com/normalize.css'
    ]
  },
  {
    global: 'Cookies',
    resource: [
      'https://unpkg.com/js-cookie'
    ]
  },
  {
    global: 'Flowlist',
    resource: [
      'https://unpkg.com/@flowlist/vue-listview'
    ]
  }
]

bootstrap(dependencies).then(() => {
  const { createApp } = Vue
  const app = createApp({})
  // do something...
}).catch(err => {
  // some module load failed
})