File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -35,14 +35,13 @@ async function main() {
3535
3636 const entryPoints = [ "./pkg/dist-src/index.js" ] ;
3737
38- // Build a CJS Node.js bundle
38+ // Build a bundle
3939 await esbuild . build ( {
4040 entryPoints,
41- outdir : "pkg/dist-node " ,
41+ outdir : "pkg/dist-bundle " ,
4242 bundle : true ,
43- platform : "node" ,
44- target : "node14" ,
45- format : "cjs" ,
43+ platform : "neutral" ,
44+ format : "esm" ,
4645 ...sharedOptions ,
4746 } ) ;
4847
@@ -63,9 +62,12 @@ async function main() {
6362 {
6463 ...pkg ,
6564 files : [ "dist-*/**" , "bin/**" ] ,
66- main : "dist-node/index.js" ,
67- types : "dist-types/index.d.ts" ,
68- module : "dist-src/index.js" ,
65+ exports : {
66+ "." : {
67+ types : "./dist-types/index.d.ts" ,
68+ import : "./dist-bundle/index.js" ,
69+ } ,
70+ } ,
6971 sideEffects : false ,
7072 } ,
7173 null ,
You can’t perform that action at this time.
0 commit comments