[js/web] ESM: use the bundled target as default export (#20991)

### Description
ESM: use the bundled target as default export

In this change, the default import of the following entries:
```
import from 'onnxruntime-web';
import from 'onnxruntime-web/all';
import from 'onnxruntime-web/webgpu';
```
will use the "bundled" version, which has no dynamic import.

This change should only apply to ESM on web.
This commit is contained in:
Yulong Wang 2024-06-11 11:14:55 -07:00 committed by GitHub
parent 05032e5e5f
commit dd805ff77d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,13 +73,13 @@
"import": "./dist/ort.node.min.mjs",
"require": "./dist/ort.node.min.js"
},
"import": "./dist/ort.min.mjs",
"import": "./dist/ort.bundle.min.mjs",
"require": "./dist/ort.min.js",
"types": "./types.d.ts"
},
"./all": {
"node": null,
"import": "./dist/ort.all.min.mjs",
"import": "./dist/ort.all.bundle.min.mjs",
"require": "./dist/ort.all.min.js",
"types": "./types.d.ts"
},
@ -97,7 +97,7 @@
},
"./webgpu": {
"node": null,
"import": "./dist/ort.webgpu.min.mjs",
"import": "./dist/ort.webgpu.bundle.min.mjs",
"require": "./dist/ort.webgpu.min.js",
"types": "./types.d.ts"
},