@@ -33,30 +33,6 @@ async function main() {
33
33
await rm ( typeFile ) ;
34
34
}
35
35
36
- const entryPoints = [ "./pkg/dist-src/index.js" ] ;
37
-
38
- await Promise . all ( [
39
- // Build the a CJS Node.js bundle
40
- esbuild . build ( {
41
- entryPoints,
42
- outdir : "pkg/dist-node" ,
43
- bundle : true ,
44
- platform : "node" ,
45
- target : "node18" ,
46
- format : "esm" ,
47
- ...sharedOptions ,
48
- } ) ,
49
- // Build an ESM browser bundle
50
- esbuild . build ( {
51
- entryPoints,
52
- outdir : "pkg/dist-web" ,
53
- bundle : true ,
54
- platform : "browser" ,
55
- format : "esm" ,
56
- ...sharedOptions ,
57
- } ) ,
58
- ] ) ;
59
-
60
36
// Copy the README, LICENSE to the pkg folder
61
37
await copyFile ( "LICENSE" , "pkg/LICENSE" ) ;
62
38
await copyFile ( "README.md" , "pkg/README.md" ) ;
@@ -76,18 +52,12 @@ async function main() {
76
52
files : [ "dist-*/**" , "bin/**" ] ,
77
53
exports : {
78
54
"." : {
79
- node : {
80
- types : "./dist-types/index.d.ts" ,
81
- import : "./dist-node/index.js" ,
82
- } ,
83
- browser : {
84
- types : "./dist-types/index.d.ts" ,
85
- import : "./dist-web/index.js" ,
86
- }
55
+ types : "./dist-types/index.d.ts" ,
56
+ import : "./dist-src/index.js" ,
87
57
}
88
58
} ,
89
59
sideEffects : false ,
90
- unpkg : "dist-web /index.js" ,
60
+ unpkg : "dist-src /index.js" ,
91
61
} ,
92
62
null ,
93
63
2
0 commit comments