forked from adamwong246/testeranto
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbundle.ts
More file actions
28 lines (25 loc) · 744 Bytes
/
bundle.ts
File metadata and controls
28 lines (25 loc) · 744 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as esbuild from "esbuild";
import { solidityEsBuildConfig } from "./src/subPackages/solidity/";
await esbuild.build({
entryPoints: [
"src/MyFirstContract/MyFirstContractUi.tsx",
"src/MyFirstContract/MyFirstContractUi.html",
"src/ClassicalComponent/react-dom/index.tsx",
"src/ClassicalComponent/react-dom/index.html",
],
bundle: true,
format: "iife",
platform: "browser",
outdir: "dist/web",
plugins: [solidityEsBuildConfig()],
loader: { ".html": "copy" },
});
await esbuild.build({
outExtension: { ".js": ".mjs" },
entryPoints: ["src/MyFirstContract/MyFirstContractServer.ts"],
bundle: true,
format: "esm",
platform: "node",
outdir: "dist/node",
plugins: [solidityEsBuildConfig()],
});