esbuild-wasm-bundler/README.md

588 B

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

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/"
    }}
);