{"id":13506724,"url":"https://github.com/FEMessage/nuxt-micro-frontend","last_synced_at":"2025-03-30T05:31:21.480Z","repository":{"id":43037006,"uuid":"241583884","full_name":"FEMessage/nuxt-micro-frontend","owner":"FEMessage","description":"🎳Nuxt module for micro-frontend solution","archived":false,"fork":false,"pushed_at":"2021-10-26T14:40:31.000Z","size":557,"stargazers_count":130,"open_issues_count":13,"forks_count":27,"subscribers_count":10,"default_branch":"dev","last_synced_at":"2025-03-23T00:55:08.779Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://deep-han.github.io/qiankun","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FEMessage.png","metadata":{"files":{"readme":"README-zh.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-19T09:39:37.000Z","updated_at":"2024-10-28T11:30:42.000Z","dependencies_parsed_at":"2022-09-09T04:11:35.576Z","dependency_job_id":null,"html_url":"https://github.com/FEMessage/nuxt-micro-frontend","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FEMessage%2Fnuxt-micro-frontend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FEMessage%2Fnuxt-micro-frontend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FEMessage%2Fnuxt-micro-frontend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FEMessage%2Fnuxt-micro-frontend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FEMessage","download_url":"https://codeload.github.com/FEMessage/nuxt-micro-frontend/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281099,"owners_count":20752203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T01:00:56.282Z","updated_at":"2025-03-30T05:31:20.240Z","avatar_url":"https://github.com/FEMessage.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# Nuxt-Micro-Front-End\n\n[![Build Status](https://badgen.net/travis/FEMessage/nuxt-micro-frontend/master)](https://travis-ci.com/FEMessage/nuxt-micro-frontend)\n[![NPM Download](https://badgen.net/npm/dm/@femessage/nuxt-micro-frontend)](https://www.npmjs.com/package/@femessage/nuxt-micro-frontend)\n[![NPM Version](https://badgen.net/npm/v/@femessage/nuxt-micro-frontend)](https://www.npmjs.com/package/@femessage/nuxt-micro-frontend)\n[![NPM License](https://badgen.net/npm/license/@femessage/nuxt-micro-frontend)](https://github.com/FEMessage/nuxt-micro-frontend/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/FEMessage/nuxt-micro-frontend/pulls)\n[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)\n\n使用 Nuxt 实践微前端架构，现在已经支持 [qiankun](https://qiankun.umijs.org/)\n\n[English](./README.md)\n\n[📖 **发布日志**](./CHANGELOG.md)\n\n## 安装\n\n1. 添加 `@femessage/nuxt-micro-frontend` 依赖到你的项目中\n\n```bash\nyarn add @femessage/nuxt-micro-frontend -D \n\n# or npm install @femessage/nuxt-micro-frontend\n```\n\n2. 添加 `@femessage/nuxt-micro-frontend` 到 `nuxt.config.js` 的 `modules` 属性中\n\n```js\n{\n  modules: [\n    // 一般使用\n    '@femessage/nuxt-micro-frontend',\n\n    // 带上模块参数\n    ['@femessage/nuxt-micro-frontend', { /* module options */ }]\n  ]\n}\n```\n\n## 模块参数\n\n[文档](https://github.com/FEMessage/micro-nuxt/blob/master/lib/module.js)\n\n\u003e 推荐使用 `build.devMiddleware.headers` 属性来设置开发环境资源 http header, 可以查看 Nuxt API: The build Property \u003e [devMiddleware](https://nuxtjs.org/api/configuration-build#devmiddleware)\n\n**path**: 微前端生命周期函数定义文件，相对 rootDir 的路径\n\n**force**: 强制使用模块功能，忽略 Nuxt 版本校验\n\n**unique**: 由于 qiankun 需要一个唯一的包名区分多个子应用，如果懒得修改可以将这个属性设置为 `true`，这样会生成一个唯一的包名\n\n**output**: 由于接入不同的生态体系，需要不同的打包格式，这里可以根据 [webpack output](https://webpack.js.org/configuration/output/) 提供的选项进行注入\n\n## 支持的微前端框架\n- [x] [qiankun](https://github.com/umijs/qiankun)\n- [x] [single-SPA](https://github.com/single-spa/single-spa) demo 在 examples/single-spa-demo 下\n\n## 微前端生命周期函数例子\n[Qiankun](https://github.com/FEMessage/micro-nuxt/blob/master/examples/normal/mfe.js)\n\n- 增加了 `mounted` 和 `beforeUnmount` 两个钩子方便操作 vue 实例\n\n## 开发\n\n1. 克隆此仓库\n2. 安装依赖 `yarn install` 或者 `npm install`\n3. 运行 `cd examples/normal \u0026\u0026 npm run dev` 启动开发服务\n\n## License\n\n[MIT License](./LICENSE)\n\nCopyright (c) FEMessage\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFEMessage%2Fnuxt-micro-frontend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFEMessage%2Fnuxt-micro-frontend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFEMessage%2Fnuxt-micro-frontend/lists"}