{"id":16255105,"url":"https://github.com/m90/esbuild-plugin-browserify-adapter","last_synced_at":"2025-03-19T21:30:37.136Z","repository":{"id":42491288,"uuid":"336750180","full_name":"m90/esbuild-plugin-browserify-adapter","owner":"m90","description":"Use Browserify transforms as esbuild plugins","archived":false,"fork":false,"pushed_at":"2023-01-17T17:38:46.000Z","size":370,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T01:29:09.339Z","etag":null,"topics":["browserify","browserify-transform","esbuild","esbuild-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m90.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","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":"2021-02-07T09:36:41.000Z","updated_at":"2023-10-07T15:36:24.000Z","dependencies_parsed_at":"2023-01-22T13:30:11.216Z","dependency_job_id":null,"html_url":"https://github.com/m90/esbuild-plugin-browserify-adapter","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m90%2Fesbuild-plugin-browserify-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m90%2Fesbuild-plugin-browserify-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m90%2Fesbuild-plugin-browserify-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m90%2Fesbuild-plugin-browserify-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m90","download_url":"https://codeload.github.com/m90/esbuild-plugin-browserify-adapter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244507835,"owners_count":20463689,"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":["browserify","browserify-transform","esbuild","esbuild-plugin"],"created_at":"2024-10-10T15:28:12.579Z","updated_at":"2025-03-19T21:30:36.848Z","avatar_url":"https://github.com/m90.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esbuild-plugin-browserify-adapter\n\nUse [Browserify transforms](https://github.com/browserify/browserify-handbook#transforms) as [esbuild plugins](https://esbuild.github.io/plugins/).\n\n## Installation\n\nThe package is released to npm as `esbuild-plugin-browserify-adapter`:\n\n```\nnpm install esbuild-plugin-browserify-adapter -D\n```\n\n## Usage\n\nThis adapter lets you use any existing Browserify transform as an esbuild plugin. The plugin function can be passed an arbitrary number of transforms. Just like with Browserify itself, options are passed by wrapping the transform in an array and appending the options to that list.\n\n__Please note: This module does not work with Browserify plugins.__\n\n### Basic usage\n\n```js\nconst esbuild = require('esbuild')\nconst coffeeify = require('coffeeify') // any transform works\nconst browserifyAdapter = require('esbuild-plugin-browserify-adapter')\n\nesbuild.build({\n  entryPoints: ['./app.coffee'],\n  bundle: true,\n  plugins: [browserifyAdapter(coffeeify)],\n  outdir: './public'\n})\n```\n\n### Passing options\n\n```js\nconst esbuild = require('esbuild')\nconst envify = require('envify') // any transform works\nconst browserifyAdapter = require('esbuild-plugin-browserify-adapter')\n\nesbuild.build({\n  entryPoints: ['./app.js'],\n  bundle: true,\n  plugins: [browserifyAdapter([envify, { BUNDLE_TIME: new Date().toJSON() }])],\n  outdir: './public'\n})\n```\n\n### Passing multiple transforms\n\nIn case you need to use multiple transforms, pass all of them to the adapter at once. Just like in Browserify, they will be run in the order given.\n\n```js\nconst esbuild = require('esbuild')\nconst coffeeify = require('coffeeify') // any transform works\nconst envify = require('envify') // any transform works\nconst browserifyAdapter = require('esbuild-plugin-browserify-adapter')\n\nesbuild.build({\n  entryPoints: ['./app.coffee'],\n  bundle: true,\n  plugins: [browserifyAdapter(\n    coffeeify,\n    [envify, { BUNDLE_TIME: new Date().toJSON() }]\n  )],\n  outdir: './public'\n})\n```\n\n## Why?\n\nThis plugin can help you with gradually migrating a Browserify-based setup to an esbuild-based one without having to change everything at once. It is not intended to be used as a permanent solution unless your transform usage is very limited.\n\n---\n\n## Releasing a new version\n\nNew versions can be released using `npm version \u003cpatch|minor|major\u003e`.\n\n## License\n\nCopyright 2021 Frederik Ring - Available under the Mozilla Public License 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm90%2Fesbuild-plugin-browserify-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm90%2Fesbuild-plugin-browserify-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm90%2Fesbuild-plugin-browserify-adapter/lists"}