esbuild-wasm-deno/README.md

27 lines
816 B
Markdown

# ESBuild Typescript Bunder
## Supports import maps and runs on Deno Deploy and the browser
Uses the WASM version of ESBuild for use on Deno Deploy and adds some plugins to allow for import maps. ***Unfortunately, `npm:*` and `jsr:*` specifiers are not supported currently***.
### Manual Bundle API
```javascript
import Bundle from "./mod.js";
const {outputFiles} = await Bundle({
fileSystem:import.meta.resolve('./test_project/'),
esBuild:{entryPoints:["entry"]},
importMap:{"imports": {
"entry": "./app.tsx",
"react": "https://esm.sh/preact@10.22.0/compat",
"react/": "https://esm.sh/preact@10.22.0/compat/"
}}
});
for(const item of outputFiles){
// do something with the output...
console.log(item.text.substring(0, 200));
}
```
(dev server is being reworked)