{"id":19935564,"url":"https://github.com/baozouai/reduce-enum-webpack-plugin","last_synced_at":"2025-07-06T00:05:31.605Z","repository":{"id":111388374,"uuid":"609763864","full_name":"baozouai/reduce-enum-webpack-plugin","owner":"baozouai","description":"将ts转js的enum产物减少一半","archived":false,"fork":false,"pushed_at":"2023-06-28T14:43:37.000Z","size":121,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-03T12:35:51.294Z","etag":null,"topics":["enum","typescript","webpack"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/reduce-enum-webpack-plugin","language":"TypeScript","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/baozouai.png","metadata":{"files":{"readme":"README-zh_CN.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-05T06:45:40.000Z","updated_at":"2023-06-20T02:44:52.000Z","dependencies_parsed_at":"2024-11-16T04:45:18.395Z","dependency_job_id":null,"html_url":"https://github.com/baozouai/reduce-enum-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baozouai/reduce-enum-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baozouai%2Freduce-enum-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baozouai%2Freduce-enum-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baozouai%2Freduce-enum-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baozouai%2Freduce-enum-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baozouai","download_url":"https://codeload.github.com/baozouai/reduce-enum-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baozouai%2Freduce-enum-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262672330,"owners_count":23346556,"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":["enum","typescript","webpack"],"created_at":"2024-11-12T23:20:39.403Z","updated_at":"2025-07-06T00:05:31.580Z","avatar_url":"https://github.com/baozouai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003cp align=\"center\"\u003e\n\u003ch1 align=\"center\"\u003ereduce-enum-webpack-plugin\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\n [![NPM version][npm-image]][npm-url] ![NPM downloads][download-image]\n\n[npm-image]: https://img.shields.io/npm/v/reduce-enum-webpack-plugin.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/reduce-enum-webpack-plugin\n\n\n[download-image]: https://img.shields.io/npm/dm/reduce-enum-webpack-plugin.svg?style=flat-square\n[download-url]: https://npmjs.org/package/reduce-enum-webpack-plugin\n\n\n\u003c/div\u003e\n\n\n中文 | [英文](./README.md)\n\n## 关于\n\n一个用来减少 ts enum 转 js 产物的 webpack 插件\n\neg:\n\n没加插件前：\n```ts\nenum Status {\n  PAID,\n  UN_PAID\n}\n\n// =\u003e\n\nvar Status;\n(function (Status) {\n  Status[Status.PAID = 0] = 'PAID'\n  Status[Status.UN_PAID = 1] = 'UN_PAID'\n})(Status || (Status = {}))\n```\n\n加插件后：\n```ts\nenum Status {\n  PAID,\n  UN_PAID\n}\n\n// =\u003e\n\nvar Status = {\n  PAID: 0,\n  UN_PAID: 1\n}\n```\n\n\n## 📦  安装\n\n```sh\npnpm add reduce-enum-webpack-plugin -D\n# or\nyarn add reduce-enum-webpack-plugin -D\n# or\nnpm i reduce-enum-webpack-plugin -D\n```\n\n ## 🔨 使用\n\n```js\nconst ReduceEnumWebpackPlugin = require('reduce-enum-webpack-plugin').default\n\n// webpack.config.js\n\nmodule.exports = {\n\n  plugins: [\n    isProduction \u0026\u0026 new ReduceEnumWebpackPlugin()\n  ],\n}\n```\n## 📄 License\n\nreduce-enum-webpack-plugin is [MIT licensed](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaozouai%2Freduce-enum-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaozouai%2Freduce-enum-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaozouai%2Freduce-enum-webpack-plugin/lists"}