{"id":22642684,"url":"https://github.com/hzfe/mina-webpack-plugin","last_synced_at":"2025-04-11T23:22:42.322Z","repository":{"id":41177098,"uuid":"318099501","full_name":"HZFE/mina-webpack-plugin","owner":"HZFE","description":"小程序 webpack 插件","archived":false,"fork":false,"pushed_at":"2021-04-16T07:38:04.000Z","size":19,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-25T19:13:39.899Z","etag":null,"topics":["minapp","webpack"],"latest_commit_sha":null,"homepage":"https://hzfe.github.io/mina-webpack-plugin/","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/HZFE.png","metadata":{"files":{"readme":"README.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-12-03T06:37:12.000Z","updated_at":"2023-09-08T06:05:06.000Z","dependencies_parsed_at":"2022-08-22T22:21:01.768Z","dependency_job_id":null,"html_url":"https://github.com/HZFE/mina-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HZFE%2Fmina-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HZFE%2Fmina-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HZFE%2Fmina-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HZFE%2Fmina-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HZFE","download_url":"https://codeload.github.com/HZFE/mina-webpack-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248493333,"owners_count":21113235,"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":["minapp","webpack"],"created_at":"2024-12-09T05:07:53.942Z","updated_at":"2025-04-11T23:22:42.294Z","avatar_url":"https://github.com/HZFE.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mina-webpack-plugin\n\n![npm](https://img.shields.io/npm/dt/@hzfe/mina-webpack-plugin)\n![npm](https://img.shields.io/npm/v/@hzfe/mina-webpack-plugin)\n\n## 使用 webpack 开发原生小程序的优势\n\n1. 比使用小程序开发者工具自带编译功能或使用 gulp，用 webpack 进行小程序开发更靠近 web 开发的体验，webpack 社区庞大，解决方案更多。\n   - 正常使用 npm 包；\n   - tree shaking；\n   - 使用 webpack loader / plugin；\n   - alias。\n2. 如果你没有一份代码支持多端的需求，那么相比使用各大小程序框架，使用 webpack 开发原生小程序：\n   - 不用担心框架不再维护；\n   - 不用学习不同框架的各类语法糖；\n   - 不用在踩小程序坑的基础上还要踩框架的坑。\n\n## mina-webpack-plugin 介绍\n\n### 作用\n\n1. 读取 app.json 配置自动收集所有入口模块；\n2. 配合 splitChunk 把通用依赖自动引入进文件中；\n\n### 使用方法\n\n```bash\nnpm i @hzfe/mina-webpack-plugin --save-dev\n```\n\n```js\n{\n  plugins: [\n    /**\n     * 可以传一个对象参数\n     * options = {\n     *   extensions: [\".js\"], // defalt\n     *   assetsChunkName: \"__assets_chunk_name__\", // default\n     * }\n     **/\n    new MinaPlugin(),\n  ];\n}\n```\n\n## 相关项目\n\n- [小程序 webpack 开发模板](https://github.com/HZFE/mina-boilerplate)\n- [wxml-loader](https://github.com/HZFE/wxml-loader)\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzfe%2Fmina-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhzfe%2Fmina-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhzfe%2Fmina-webpack-plugin/lists"}