{"id":15493457,"url":"https://github.com/sinclairzx81/esbuild-wasm-resolve","last_synced_at":"2025-04-22T19:48:03.194Z","repository":{"id":50695306,"uuid":"519743074","full_name":"sinclairzx81/esbuild-wasm-resolve","owner":"sinclairzx81","description":"File Resolution for Esbuild running in the Browser","archived":false,"fork":false,"pushed_at":"2022-07-31T10:43:22.000Z","size":2700,"stargazers_count":26,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-13T05:02:31.421Z","etag":null,"topics":["esbuild","filesytem","resolve","wasm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sinclairzx81.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2022-07-31T10:22:43.000Z","updated_at":"2025-04-03T12:22:53.000Z","dependencies_parsed_at":"2022-08-26T15:01:17.682Z","dependency_job_id":null,"html_url":"https://github.com/sinclairzx81/esbuild-wasm-resolve","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fesbuild-wasm-resolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fesbuild-wasm-resolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fesbuild-wasm-resolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sinclairzx81%2Fesbuild-wasm-resolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sinclairzx81","download_url":"https://codeload.github.com/sinclairzx81/esbuild-wasm-resolve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249854581,"owners_count":21335129,"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":["esbuild","filesytem","resolve","wasm"],"created_at":"2024-10-02T08:06:49.388Z","updated_at":"2025-04-22T19:48:03.153Z","avatar_url":"https://github.com/sinclairzx81.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align='center'\u003e\n\n\u003ch1\u003eesbuild-wasm-resolve\u003c/h1\u003e\n\n\u003cp\u003eFile Resolution for Esbuild running in the Browser\u003c/p\u003e\n\n\u003cpre\u003e\n          import { App } from './index.ts'            \n\n┌──────────────┐                      ┌──────────────┐\n│              │ ─── '/index.ts' ───\u003e │              │\n│ esbuild-wasm │                      │   resolver   │\n│              │ \u003c───── [code] ────── │              │\n└──────────────┘                      └──────────────┘\n\u003c/pre\u003e\n\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n[![npm version](https://badge.fury.io/js/%40sinclair%2Fesbuild-wasm-resolve.svg)](https://badge.fury.io/js/%40sinclair%2Fesbuild-wasm-resolve)\n\n\u003c/div\u003e\n\n\n## Overview\n\nesbuild-wasm-resolve is a file resolver for esbuild-wasm. Due to Web Browsers not having direct access to a file system, esbuild-wasm-resolve intercepts file `read` requests made by esbuild during compilation allowing applications to resolve files externally. With this mechanism, esbuild can resolve files from IndexedDB, LocalStorage, Http or any other readable device accessible to the browser.\n\nesbuild-wasm-resolve is primarily made with editors in mind. It is offered as is to anyone who may find it of use.\n\nLicense MIT\n\n## Install\n\n```bash\n$ npm install @sinclair/esbuild-wasm-resolve\n```\n\n\n## Usage\n\nThe following shows general usage.\n\n```typescript\nimport { Compiler } from '@sinclair/esbuild-wasm-resolve'\n\nconst compiler = new Compiler({\n    \n    resolve: path =\u003e fetch('http://localhost:5000' + path).then(res =\u003e res.text())\n\n}, { wasmURL: 'esbuild.wasm' })\n\nconst code = await compiler.compile('/index.ts', { format: 'esm' })\n//\n//                                   ^ http://localhost:5000/index.ts\n\nconsole.log(code)\n```\n\nRefer to the example [here](https://github.com/sinclairzx81/esbuild-wasm-resolve/tree/main/example) for additional usage.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinclairzx81%2Fesbuild-wasm-resolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinclairzx81%2Fesbuild-wasm-resolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinclairzx81%2Fesbuild-wasm-resolve/lists"}