Closed mvestnik closed 4 months ago
Please add preact support
Test component:
import { render, Component } from "https://esm.sh/preact@10.20.2" export class Test extends Component { render() { return ( <> <button>Post</button> </> ) } } render(<Test />, document.getElementById("#test"))
Esbuild config:
import * as esbuild from "https://deno.land/x/esbuild@v0.20.2/mod.js" import { denoPlugins } from "https://deno.land/x/esbuild_deno_loader@0.9.0/mod.ts" const context = await esbuild.context({ plugins: [...denoPlugins()], entryPoints: ["frontend/app/*.tsx"], jsx: "automatic", jsxImportSource: "preact", bundle: true, minify: true, format: "esm", outdir: "static/js", }) await context.watch()
Result:
Please add preact support
Test component:
Esbuild config:
Result:![Screenshot from 2024-04-19 10-29-30.png](https://github.com/lucacasonato/esbuild_deno_loader/assets/150515091/e8a3d36c-977d-463b-b366-827565623064)