We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12b8a00 commit 6cac6a6Copy full SHA for 6cac6a6
scripts/build.mjs
@@ -35,14 +35,13 @@ async function main() {
35
36
const entryPoints = ["./pkg/dist-src/index.js"];
37
38
- // Build a CJS Node.js bundle
+ // Build a bundle
39
await esbuild.build({
40
entryPoints,
41
- outdir: "pkg/dist-node",
+ outdir: "pkg/dist-bundle",
42
bundle: true,
43
- platform: "node",
44
- target: "node14",
45
- format: "cjs",
+ platform: "neutral",
+ format: "esm",
46
...sharedOptions,
47
});
48
@@ -63,9 +62,12 @@ async function main() {
63
62
{
64
...pkg,
65
files: ["dist-*/**", "bin/**"],
66
- main: "dist-node/index.js",
67
- types: "dist-types/index.d.ts",
68
- module: "dist-src/index.js",
+ exports: {
+ ".": {
+ types: "./dist-types/index.d.ts",
+ import: "./dist-bundle/index.js",
69
+ },
70
71
sideEffects: false,
72
},
73
null,
0 commit comments