-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.mjs
More file actions
31 lines (29 loc) · 805 Bytes
/
Copy pathbuild.mjs
File metadata and controls
31 lines (29 loc) · 805 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
29
30
31
import * as esbuild from "esbuild";
import {entryPoints} from "./entryPoints.mjs";
import { solidPlugin } from "esbuild-plugin-solid";
// The fix was posted here:
// https://medium.com/geekculture/build-a-library-with-esbuild-23235712f3c
await esbuild.build({
entryPoints: entryPoints,
bundle: true,
minify: true,
// splitting: true,
write: true,
treeShaking: true,
sourcemap: true,
format: "esm",
define: { gobal: "window" },
target: ["esnext"],
outdir: "dist/js",
logLevel: "info",
legalComments: "none",
external: [
"solid-js",
"solid-js/*",
],
// outExtension: { '.js': '.cjs' },
// target: ['chrome58', 'firefox57', 'safari11', 'edge16'],
plugins:[
solidPlugin()
]
}).catch(() => process.exit(1));