esbuild-wasm-bundler/README.md

23 lines
588 B
Markdown
Raw Normal View History

2024-06-12 17:05:41 -04:00
# Bundle that .TSX in your Deno project for the browser.
## Supports import maps and runs on Deno Deploy
You can 1) run the bundler yourself and collect the transpiled output, or 2) just point the included static file server to some local (or HTTP!) files to get up and running quickly.
### TypeScript API
```typescript
import Bundle from "./mod.ts";
Bundle(
// ESBuild configuration:
{entry:["./app.tsx"]},
// import map:
{"imports": {
"react": "https://esm.sh/preact@10.22.0/compat",
"react/": "https://esm.sh/preact@10.22.0/compat/"
}}
);
```