{"id":22779350,"url":"https://github.com/microappjs/plugin-webpack","last_synced_at":"2025-09-09T08:45:12.301Z","repository":{"id":38427223,"uuid":"226768920","full_name":"MicroAppJS/plugin-webpack","owner":"MicroAppJS","description":"[Plugin] webpack plugin.","archived":false,"fork":false,"pushed_at":"2023-04-08T21:22:31.000Z","size":896,"stargazers_count":0,"open_issues_count":23,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T15:51:34.716Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/MicroAppJS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-09T02:35:17.000Z","updated_at":"2020-03-02T16:44:28.000Z","dependencies_parsed_at":"2025-02-05T15:48:26.287Z","dependency_job_id":"ca189b85-fbb4-4566-b477-bdcff9e3135e","html_url":"https://github.com/MicroAppJS/plugin-webpack","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroAppJS%2Fplugin-webpack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroAppJS%2Fplugin-webpack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroAppJS%2Fplugin-webpack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MicroAppJS%2Fplugin-webpack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MicroAppJS","download_url":"https://codeload.github.com/MicroAppJS/plugin-webpack/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246326789,"owners_count":20759439,"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-12-11T20:08:33.596Z","updated_at":"2025-03-30T14:14:20.795Z","avatar_url":"https://github.com/MicroAppJS.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Micro APP Plugin - Webpack\n\n[Plugin] webpack plugin.\n\n基于webpack多入口的多仓库业务模块开发的插件应用框架核心库.\n\n[![Github Actions Coveralls][Github-Actions-Coveralls]][Github-Actions-Coveralls-url]\n[![Coverage Status][Coverage-img]][Coverage-url]\n[![NPM Version][npm-img]][npm-url]\n[![NPM Download][download-img]][download-url]\n\n[Github-Actions-Coveralls]: https://github.com/MicroAppJS/plugin-webpack/workflows/Coveralls/badge.svg\n[Github-Actions-Coveralls-url]: https://github.com/MicroAppJS/plugin-webpack\n[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/plugin-webpack/badge.svg?branch=master\n[Coverage-url]: https://coveralls.io/github/MicroAppJS/plugin-webpack?branch=master\n[npm-img]: https://img.shields.io/npm/v/@micro-app/plugin-webpack.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@micro-app/plugin-webpack\n[download-img]: https://img.shields.io/npm/dm/@micro-app/plugin-webpack.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@micro-app/plugin-webpack\n\n## Install\n\n```sh\nyarn add @micro-app/plugin-webpack\n```\n\nor\n\n```sh\nnpm install -S @micro-app/plugin-webpack\n```\n\n## Usage\n\n### 在项目 `根目录` 的 `micro-app.config.js` 文件中配置\n\n```js\nmodule.exports = {\n    // ...\n\n    plugins: [ // 自定义插件\n        ['@micro-app/plugin-webpack', {\n            // 一些插件配置项\n            // ReplaceFileNotExists: {\n            //     debug: false, // 开启log\n            //     warnHint: 'Not Found',\n            //     loader: '', // 路径\n            //     resource: '', // 路径\n            //     test: /^@micros\\//i, // 匹配规则\n            // },\n            // SpeedMeasurePlugin: {\n            //     disabled: true,\n            // },\n            // HappyPack: {\n            //     disabled: true,\n            // },\n        }],\n    ],\n};\n```\n\n### Build\n\n```sh\nnpx micro-app build\n```\n\nor\n\n```sh\nnpx micro-app-build\n```\n\n### 内置部分插件提供的 api 方法补充\n\n可通过如下命令进行动态查看\n\n```js\nnpx micro-app show methods\n```\n\n以提供的方法如下, `System Build-in` 为内置方法\n\n```js\n╰─➤  npx micro-app show methods\n  Plugin Methods:\n     * modifyChainWebpackConfig    ( 合并之后提供 webpack-chain 进行再次修改事件 )\n     * onChainWebpcakConfig        ( 修改之后提供 webpack-chain 进行查看事件 )\n     * modifyWebpackConfig         ( 合并之后提供 webpack config 进行再次修改事件 )\n     * onBuildSuccess              ( 构建成功时事件 )\n     * onBuildFail                 ( 构建失败时事件 )\n     * beforeBuild                 ( 开始构建前事件 )\n     * afterBuild                  ( 构建结束后事件 )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroappjs%2Fplugin-webpack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicroappjs%2Fplugin-webpack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicroappjs%2Fplugin-webpack/lists"}