esbuild-wasm-bundler/bundler.tsx

14 lines
526 B
TypeScript

import "other";
import * as ESBuild from "https://deno.land/x/esbuild@v0.19.11/mod.js";
import * as ESBuildDeno from "https://deno.land/x/esbuild_deno_loader@0.9.0/mod.ts";
const result = await ESBuild.build({
plugins: [...ESBuildDeno.denoPlugins({configPath:Deno.cwd()+"/deno.json"} as ESBuildDeno.DenoPluginsOptions)],
entryPoints: [import.meta.resolve("entry")],
bundle: true,
minify: true,
jsx:"automatic",
jsxImportSource:"react",
format: "esm",
} as ESBuild.BuildOptions);
console.log(result.outputFiles);