esbuild-wasm-bundler/bundler.tsx

14 lines
526 B
TypeScript
Raw Normal View History

2024-06-03 11:39:19 -04:00
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);