{"id":28295512,"url":"https://github.com/beeequeue/unplugin-node-sea","last_synced_at":"2026-03-01T14:33:48.505Z","repository":{"id":291756598,"uuid":"978676020","full_name":"beeequeue/unplugin-node-sea","owner":"beeequeue","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-23T18:01:06.000Z","size":165,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-07T00:56:20.587Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/beeequeue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-05-06T10:52:19.000Z","updated_at":"2025-06-23T18:01:09.000Z","dependencies_parsed_at":"2025-06-14T09:32:17.094Z","dependency_job_id":"a05414fc-2363-403a-8a0d-05e33bebf32b","html_url":"https://github.com/beeequeue/unplugin-node-sea","commit_stats":null,"previous_names":["beeequeue/unplugin-node-sea"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/beeequeue/unplugin-node-sea","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Funplugin-node-sea","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Funplugin-node-sea/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Funplugin-node-sea/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Funplugin-node-sea/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeequeue","download_url":"https://codeload.github.com/beeequeue/unplugin-node-sea/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeequeue%2Funplugin-node-sea/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29970993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T14:11:48.712Z","status":"ssl_error","status_checked_at":"2026-03-01T14:11:48.352Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-05-22T14:18:30.819Z","updated_at":"2026-03-01T14:33:48.486Z","avatar_url":"https://github.com/beeequeue.png","language":"TypeScript","readme":"# unplugin-node-sea\n\n[![npm](https://img.shields.io/npm/v/unplugin-node-sea)](https://www.npmjs.com/package/unplugin-node-sea)\n![node-current](https://img.shields.io/node/v/unplugin-node-sea)\n\n![rolldown ✅](https://img.shields.io/badge/rolldown-✅-darkgreen?logo=rollupdotjs)\n![rollup ❌](https://img.shields.io/badge/rollup-❌-darkred?logo=rollupdotjs\u0026logoColor=CE412B)\n![vite ❌](https://img.shields.io/badge/vite-❌-darkred?logo=vite)\n![esbuild ❌](https://img.shields.io/badge/esbuild-❌-darkred?logo=esbuild)\n![webpack ❌](https://img.shields.io/badge/webpack-❌-darkred?logo=webpack)\n![rspack ❌](https://img.shields.io/badge/rspack-❌-darkred?logo=rspack)\n![farm ❌](https://img.shields.io/badge/farm-❌-darkred?logo=farmjs6)\n\n_Currently only supports Rolldown since the information needed are only supplied by the framework-specific unplugin hooks._\n\n---\n\nA bundler plugin that automatically creates an executable file from a JS file using [Node Single Executable Applications (SEA)](https://nodejs.org/api/single-executable-applications.html).\n\nIt finds the entrypoint from the bundler output and embeds it into a Node executable for the building platform.\n\n## Read before using\n\n- Node SEA executables are as large as the Node executable (100MB~).\n- Node SEA executables are not portable and only work on the same platform as the original Node exec.\n  - You can download the correct Node exec for your target and use that, but you will have to disable the Node Compile Cache (`codeCache: false`), slowing down startups significantly.\n  - Otherwise, you will need to run your builds on the target platform.\n  - See [this example](https://github.com/beeequeue/sizer/blob/b741a4d7710b88ed40815240ed6c5b8c24cb8228/.github/workflows/ci.yml#L10-L47).\n- Node SEA does not support ES modules.\n  - If you use ESM, you will need to build a separate CJS bundle for your SEA.\n- Node SEA does not support `import()`.\n- V8 snapshots require extra work.\n  - To enable V8 snapshots in Node SEA:s, the main entry script **must** invoke `v8.startupSnapshot.setDeserializeMainFunction()` [as described in the documentation](https://nodejs.org/api/single-executable-applications.html#startup-snapshot-support).\n\n## Usage\n\n\u003c!--\n\u003cdetails\u003e\n\u003csummary\u003eRolldown\u003c/summary\u003e\n--\u003e\n\n```ts\nimport { defineConfig } from \"tsdown\"\nimport { nodeSeaUnplugin } from \"unplugin-node-sea\"\n\nexport default defineConfig({\n  entry: \"src/cli.ts\",\n  outDir: \"dist\",\n\n  platform: \"node\",\n  target: \"node20\",\n  format: \"cjs\",\n  minify: false,\n  fixedExtension: true,\n\n  plugins: [\n    // All options are optional\n    nodeSeaUnplugin.rolldown({\n      name: \"foo\", // name of executable (without .exe). Defaults to name in package.json\n      codeCache: true, // Enable v8 compile cache. Default to `true`\n      v8Snapshot: true, // Enable v8 snapshot (see section regarding it). Defaults to false.\n    }),\n  ],\n}) as never\n```\n\n\u003c!--\u003c/details\u003e--\u003e\n\n## To-do (updated 2025-05-06)\n\n- [ ] Add tests.\n- [ ] Add support for more bundlers.\n  - Split build logic from the bundler specific config and output handlers\n- [ ] Add error for enabling `v8Snapshot` without `v8.startupSnapshot.setDeserializeMainFunction()` being found in the output file.\n- [ ] Maybe automatically add `v8.startupSnapshot.setDeserializeMainFunction()` if `v8Snapshot` is enabled?\n- [ ] Investigate if it's possible to implement `postject` in JS instead of using the 4MB C++ library it uses.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeequeue%2Funplugin-node-sea","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeequeue%2Funplugin-node-sea","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeequeue%2Funplugin-node-sea/lists"}