{"id":24460981,"url":"https://github.com/talljack/unplugin-remove","last_synced_at":"2026-03-10T09:02:26.501Z","repository":{"id":59597183,"uuid":"536904482","full_name":"Talljack/unplugin-remove","owner":"Talljack","description":"Auto remove some unused code like console and debugger","archived":false,"fork":false,"pushed_at":"2025-02-24T15:14:57.000Z","size":1133,"stargazers_count":9,"open_issues_count":5,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-01T12:20:31.295Z","etag":null,"topics":["build","esbuild","plugin","remove","rolldown","rollup","rspack","unplugin","vite","webpack"],"latest_commit_sha":null,"homepage":"","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/Talljack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":["Talljack"]}},"created_at":"2022-09-15T07:04:06.000Z","updated_at":"2025-09-17T23:11:00.000Z","dependencies_parsed_at":"2024-05-03T07:41:34.038Z","dependency_job_id":"c3b131aa-3d45-4d85-a413-77be8fa8ff7b","html_url":"https://github.com/Talljack/unplugin-remove","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":"unplugin/unplugin-starter","purl":"pkg:github/Talljack/unplugin-remove","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talljack%2Funplugin-remove","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talljack%2Funplugin-remove/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talljack%2Funplugin-remove/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talljack%2Funplugin-remove/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Talljack","download_url":"https://codeload.github.com/Talljack/unplugin-remove/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talljack%2Funplugin-remove/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30328272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["build","esbuild","plugin","remove","rolldown","rollup","rspack","unplugin","vite","webpack"],"created_at":"2025-01-21T04:16:42.419Z","updated_at":"2026-03-10T09:02:26.414Z","avatar_url":"https://github.com/Talljack.png","language":"TypeScript","readme":"# unplugin-remove\n\nAuto remove `console[log|warn|error|info|debug]` and `debugger` in **production** mode.\n\n\u003cdiv\u003e\n\u003cimg src=\"https://img.shields.io/npm/dm/unplugin-remove\" /\u003e\n\u003cimg src=\"https://img.shields.io/github/last-commit/Talljack/unplugin-remove\n\"\u003e\n\u003cimg src=\"https://codecov.io/gh/Talljack/unplugin-remove/graph/badge.svg?token=KI043GVTMM\"/\u003e\n\u003c/div\u003e\n\n## Install\n\n```bash\n[npm|pnpm] i unplugin-remove -D\n\nor\n\nyarn add unplugin-remove -D\n```\n\n## Demo\n\nExample: [`playground/`](./playground/)\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport viteRemove from 'unplugin-remove/vite'\n\nexport default defineConfig({\n  plugins: [\n    viteRemove({ /* options */ }),\n  ],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport rollupRemove from 'unplugin-remove/rollup'\n\nexport default {\n  plugins: [\n    rollupRemove({ /* options */ }),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    process.env.MODE === 'production' ? require('unplugin-remove/webpack')({ /* options */ }) : null,\n  ].filter(Boolean),\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eesbuild\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// esbuild.config.js\nimport { build } from 'esbuild'\nimport esbuildRemove from 'unplugin-remove/esbuild'\n\nbuild({\n  plugins: [esbuildRemove()],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRspack  (\n  \u003cg-emoji class=\"g-emoji\" alias=\"warning\"\u003e⚠️\u003c/g-emoji\u003e\n   experimental)\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rspack.config.js\nconst RspackPlugin = require('unplugin-remove/rspack').default\n\nmodule.exports = {\n  plugins: [\n    new rspack.DefinePlugin({\n      'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),\n    }),\n    RspackPlugin(),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n  Rolldown\n  (\n  \u003cg-emoji class=\"g-emoji\" alias=\"warning\"\u003e⚠️\u003c/g-emoji\u003e\n   experimental)\n\u003c/summary\u003e\n\u003cbr\u003e\n\n```ts\n// rolldown.config.js\nimport { defineConfig } from 'rolldown'\nimport Rolldown from 'unplugin-remove/rolldown'\n\nexport default defineConfig({\n  plugins: [\n    process.env.MODE === 'production' ? Rolldown() : null,\n  ],\n})\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n## Configuration\n\nThe following shows the default values of the configuration\n\n```ts\nRemove({\n  // don't remove console.([log|warn|error|info|debug]) and debugger these module\n  external: [],\n\n  // remove console type of these module\n  // enum: ['log', 'warn', 'error', 'info', 'debug']\n  consoleType: ['log'],\n\n  // filters for transforming targets\n  include: [/\\.[jt]sx?$/, /\\.vue\\??/],\n  exclude: [/node_modules/, /\\.git/]\n})\n```\n\n## CHANGELOG\n\nYou can see [CHANGELOG](./CHANGELOG.md) here.\n\n## License\n\nMIT License © 2022-PRESENT [Talljack](https://github.com/talljack)\n","funding_links":["https://github.com/sponsors/Talljack"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalljack%2Funplugin-remove","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalljack%2Funplugin-remove","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalljack%2Funplugin-remove/lists"}