{"id":30267100,"url":"https://github.com/xxshady/altv-esbuild","last_synced_at":"2026-03-11T10:02:47.683Z","repository":{"id":50508920,"uuid":"481393409","full_name":"xxshady/altv-esbuild","owner":"xxshady","description":"SUSPENDED","archived":false,"fork":false,"pushed_at":"2025-02-21T16:32:42.000Z","size":609,"stargazers_count":38,"open_issues_count":11,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T01:25:17.728Z","etag":null,"topics":["altv","esbuild","fivem","gta5","gtav","hot-reload","hot-reload-plugin","ragemp"],"latest_commit_sha":null,"homepage":"https://xxshady.github.io/altv-esbuild","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xxshady.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2022-04-13T22:34:33.000Z","updated_at":"2025-06-02T09:15:38.000Z","dependencies_parsed_at":"2023-10-17T01:19:34.611Z","dependency_job_id":"f5e29cd0-9c5f-4a62-a010-6ca00971d64a","html_url":"https://github.com/xxshady/altv-esbuild","commit_stats":{"total_commits":158,"total_committers":3,"mean_commits":"52.666666666666664","dds":0.09493670886075944,"last_synced_commit":"7df726281e8b9c5ebdd0209dcc68b720819713ff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xxshady/altv-esbuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xxshady","download_url":"https://codeload.github.com/xxshady/altv-esbuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xxshady%2Faltv-esbuild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270644764,"owners_count":24621332,"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","status":"online","status_checked_at":"2025-08-15T02:00:12.559Z","response_time":110,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["altv","esbuild","fivem","gta5","gtav","hot-reload","hot-reload-plugin","ragemp"],"created_at":"2025-08-15T23:27:05.298Z","updated_at":"2026-03-11T10:02:42.631Z","avatar_url":"https://github.com/xxshady.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This project is suspended\n\nCurrently on hold due to unclear situation with alt:V.\n\n# altv-esbuild\n\n[![ingame demo](https://media0.giphy.com/media/v1.Y2lkPTc5MGI3NjExdXJxejQ5dGE5cHE1ZzA2OWxqOXRiYmVmbGk2d20xZzg2cGRnZ3gzdiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/Qq64W7EXWNcppAd1fC/giphy.gif)](https://imgur.com/a/vWBZsoe)\n\u003e You can click for better quality\n\nSpecial thanks ❤️ to [innxz](https://github.com/innxz) and [uncle_ara](https://github.com/uncle-ara) for financially supporting me and this library.\n\nA plugin that greatly simplifies server/client JS and TS development (as well as production) on the [alt:V](https://altv.mp) platform.\u003cbr\u003e\n(extended and improved version of the previous [esbuild dev plugin](https://github.com/xxshady/esbuild-plugin-altv-dev-server)).\n\n## Features\n\n- Write your scripts in JS/TS with enabled 5-million-polygon cars and mlo without client crashes\n- Hot reload without server restart or client reconnect (using alt:V [resource restart](https://docs.altv.mp/articles/commandlineargs.html#server-commands))\n- Full client and server support\n- Restart console command for client and server (\"res\" by default)\n- Improved top-level exception output during development\n- ~~Direct support for alt:V enums, even in JS code ([documentation](https://xxshady.github.io/altv-esbuild/interfaces/ipluginoptions.html#altvenums))~~ it was [integrated](https://github.com/altmp/altv-js-module/pull/319) into js module\n\n## Docs\n\nDocs web page: \u003chttps://xxshady.github.io/altv-esbuild\u003e.\n\n## How to use?\n\nExample resource can be found [here](https://github.com/xxshady/altv-esbuild/tree/main/example).\n\n### Install from npm\n\n```cli\nnpm i altv-esbuild\n```\n\n### Add to your build code of the server and client\n\nExample of the build server code:\n\n```js\nimport esbuild from \"esbuild\"\nimport { altvEsbuild } from \"altv-esbuild\"\n\n// your own variable\nconst DEV_MODE = true\n\nesbuild.build({\n  entryPoints: [\"src/main.js\"],\n  outfile: \"dist/bundle.js\",\n  bundle: true,\n  watch: DEV_MODE, // this build option is outdated, see example directory in the repo\n  target: \"esnext\",\n  format: \"esm\",\n  \n  plugins: [\n    altvEsbuild({\n      mode: \"server\", // use \"server\" for server code, and \"client\" for client code\n\n      // see docs for more info about these options:\n      dev: {\n        enabled: DEV_MODE,\n\n        // if `DEV_MODE` is false it will also be automatically set to false too\n        enhancedRestartCommand: true, \n      },\n    }),\n  ],\n  \n  external: [\n    // none of the following is required, this plugin handles all alt:V modules automatically\n    // \"alt-server\",\n    // \"alt-client\",\n    // \"alt-shared\",\n    // \"natives\"\n  ]\n})\n```\n\n## Limitations\n\n### Imports of types, interfaces\n\nesbuild doesn't support importing types as values, you should use type-only imports `import type` or `import { type YourType } ` syntax.\u003cbr\u003e\ntypescript-eslint with [consistent-type-imports](https://typescript-eslint.io/rules/consistent-type-imports/) rule helps a lot with this.\n\n`types.ts`\n```ts\nexport type SomeType = number\n```\n`script.ts`\n```ts\nimport { type SomeType } from './types.ts'\n```\n\n### alt:V\n\n[Connection queue](https://docs.altv.mp/articles/connection_queue.html) is not supported between hot reloads (or just resource restarts).\u003cbr\u003e\nPlayer disconnect is also [not supported](https://github.com/xxshady/altv-esbuild/issues/8) between hot reloads. Only [player connect](https://xxshady.github.io/altv-esbuild/interfaces/iplugindevoption.html#playersreconnect) is emulated for now in dev environment.\n\n### esbuild\n\nNot supported build options\n\n- Wild-card `*` [`external`](https://esbuild.github.io/api/#external) (for example: `\"node_modules/*\"`)\n- [`packages`](https://esbuild.github.io/api/#packages)\n\n## How to find exact source location of any exception?\n\nYou can use [esbuild source-maps](https://esbuild.github.io/api/#sourcemap) like this: `sourcemap: \"inline\"`.\n\n### serverside\n\nEnable source-maps in [server.toml](https://docs.altv.mp/articles/configs/server.html)\nand [here you go](https://imgur.com/HJYM0y1).\n\n### clientside\n\nHere its a bit complicated. If you use vscode [Source maps navigator](https://marketplace.visualstudio.com/items?itemName=vlkoti.vscode-sourcemaps-navigator) extension can help you jump to your source code.\n\n## Some libraries don't work with bundling\n\nIf you see such errors it may mean this is your case:\n\n- `Error: Dynamic require of \"crypto\" is not supported`\n- `SyntaxError: Unexpected identifier`\n- `ReferenceError: __dirname is not defined`\n\nLibraries that must be external: discord.js, Prisma, TypeORM\n\n✅ **Solution:** add this library to [`external`](https://esbuild.github.io/api/#external) build option of esbuild\n\n## Contributions\n\nAll contributions are greatly appreciated. If there are any questions or you would like to discuss a feature, you can always [open issue](https://github.com/xxshady/altv-esbuild/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxshady%2Faltv-esbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxxshady%2Faltv-esbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxxshady%2Faltv-esbuild/lists"}