{"id":16226221,"url":"https://github.com/ghostdevv/rollup-obfuscator","last_synced_at":"2025-05-07T15:21:50.492Z","repository":{"id":36964592,"uuid":"335582680","full_name":"ghostdevv/rollup-obfuscator","owner":"ghostdevv","description":"A plugin to obfuscate javascript for rollup based on https://www.npmjs.com/javascript-obfuscator","archived":false,"fork":false,"pushed_at":"2023-12-06T01:02:38.000Z","size":679,"stargazers_count":55,"open_issues_count":5,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:41:02.867Z","etag":null,"topics":["hacktoberfest","javascript-obfuscator","obfuscation","obfuscator","rollup","rollup-obfuscator","rollup-plugin"],"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/ghostdevv.png","metadata":{"files":{"readme":"README.md","changelog":null,"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},"funding":{"github":"ghostdevv","patreon":"onlyspaceghost","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://ghostdev.xyz/donate"}},"created_at":"2021-02-03T10:10:52.000Z","updated_at":"2025-04-12T12:05:55.000Z","dependencies_parsed_at":"2024-06-18T16:56:53.970Z","dependency_job_id":"95a8428d-3d82-491f-a1ac-a05205c6982a","html_url":"https://github.com/ghostdevv/rollup-obfuscator","commit_stats":{"total_commits":164,"total_committers":5,"mean_commits":32.8,"dds":"0.43292682926829273","last_synced_commit":"d74a13f42ca79fe1d6e39ad2eebc5b8477bc84b4"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Frollup-obfuscator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Frollup-obfuscator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Frollup-obfuscator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ghostdevv%2Frollup-obfuscator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ghostdevv","download_url":"https://codeload.github.com/ghostdevv/rollup-obfuscator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902730,"owners_count":21822292,"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":["hacktoberfest","javascript-obfuscator","obfuscation","obfuscator","rollup","rollup-obfuscator","rollup-plugin"],"created_at":"2024-10-10T12:48:31.015Z","updated_at":"2025-05-07T15:21:50.468Z","avatar_url":"https://github.com/ghostdevv.png","language":"TypeScript","readme":"# Rollup Obfuscator\n\n[![](https://img.shields.io/npm/v/rollup-obfuscator?label=Latest%20Version\u0026style=for-the-badge\u0026logo=npm\u0026color=informational)](https://www.npmjs.com/package/rollup-obfuscator)\n\nA rollup/vite plugin to obfuscate your code based on [javascript-obfuscator](https://www.npmjs.com/javascript-obfuscator)\n\n# Requirements\n\n- Rollup: v2, v3, or v4\n- Node: v16+\n- javascript-obfuscator: v4\n\n# Installing\n\nFirst install the plugin as a dev dependency:\n\n```bash\nnpm install rollup-obfuscator -D\n```\n\nNext we should add it to the **end** of the plugins array:\n\nRollup:\n```js\nimport { obfuscator } from 'rollup-obfuscator';\n\nexport default {\n    plugins: [\n        // ...\n        obfuscator()\n    ]\n}\n```\n\nVite:\n\n\u003e [!NOTE]\n\u003e This will only apply at build time\n\n```js\nimport { obfuscator } from 'rollup-obfuscator';\nimport { defineConfig } from 'vite';\n\nexport default defineConfig({\n    plugins: [\n        // ...\n        obfuscator()\n    ]\n})\n```\n\n## Configuring\n\nThe plugin should hopefully work out of the box. However, it's likely to break on larger applications - especially those that use complex frameworks. You should play with the options to find what works best for your application.\n\n```js\nplugins: [\n    obfuscator({\n        // options go here\n    })\n]\n```\n\n### Obfuscator Options\n\nAll config options can be found [here](https://www.npmjs.com/package/javascript-obfuscator). The plugin has the same default options, except setting `sourceMap: true` and `stringArray: false`.\n\n### Plugin Specific Options\n\n- `include` - A [FilterPattern](https://github.com/rollup/plugins/blob/master/packages/pluginutils/types/index.d.ts#L23) of files to include. Defaults to `['**/*.js', '**/*.ts']`\n\n- `exclude` - A [FilterPattern](https://github.com/rollup/plugins/blob/master/packages/pluginutils/types/index.d.ts#L23) of files to exclude. Defaults to `['node_modules/**']`\n\n# Migrate to v4\n\nv4 of this plugin now requires a minimum Node version of v16, it may still work on older versions but it isn't tested. `options.global` was removed and is now follows v3's `global: false` behaviour, some issues came up that made it no longer make sense. Finally a few obfuscator option defaults were changed to: `stringArray: false`, `sourceMap: true`. If you're project doesn't work with v4 please let me know why by [creating an issue](https://github.com/ghostdevv/rollup-obfuscator/issues/new). You can see the [full code changes here](https://github.com/ghostdevv/rollup-obfuscator/compare/v3.0.2...v4.0.0).\n\n# Support\n\n-   Join the [discord](https://discord.gg/2Vd4wAjJnm)\n-   Create a issue on the [GitHub](https://github.com/ghostdevv/rollup-obfuscator/issues/new)\n","funding_links":["https://github.com/sponsors/ghostdevv","https://patreon.com/onlyspaceghost","https://ghostdev.xyz/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Frollup-obfuscator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fghostdevv%2Frollup-obfuscator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fghostdevv%2Frollup-obfuscator/lists"}