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

@efox/emp-sharemf-exposes-plugin

v1.0.14

Published

share mf exposes

Downloads

34

Readme

@efox/emp-sharemf-exposes-plugin

将ModuleFederation中exposes的值提供外部使用

🔗 安装

yarn add @efox/emp-sharemf-exposes-plugin

使用

(async () => {
  // 初始化共享作用域(shared scope)用提供的已知此构建和所有远程的模块填充它
  await __webpack_init_sharing__('default');
  const container = window.someContainer; // 或从其他地方获取容器
  // 初始化容器 它可能提供共享模块
  await container.init(__webpack_share_scopes__.default);
  const module = await container.get('./module');
  // 
  module.moduleMap
  // 增加package.json version版本号
  module.v 
})();

参数

/**

  • filename: emp.js
  • unpkg: true, false, default false
  • urlMap: get projectconfig value
  • unpkgUrlMap: { prod: String, test: String, dev: String} // eg: prod: https://unpkg.yy.com/@webbase/chameleonapp@beta/chameleon_share_emp.js */

| name | descripe | 默认值 | | - | - | - | | filename | 文件名,empconfig/project-config.js中filename | emp.js | | unpkg | 是否按照版本号生成unpkg | 默认false, 需要则增加true | | unpkgUrlMap | 自行传入unpkg链接 | {prod: string, test: string, dev:string} | | urlMap | 自行传入url链接,默认按照empconfig/project-config.js中配置的prod,test,dev,contet,filename生成链接 | {prod: string, test: string, dev:string} eg: prod/context/filename |