Skip to content

Commit

Permalink
[js/web] ESM: use the bundled target as default export (#20991)
Browse files Browse the repository at this point in the history
### 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.
  • Loading branch information
fs-eire authored Jun 11, 2024
1 parent 05032e5 commit dd805ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
},
Expand Down

0 comments on commit dd805ff

Please sign in to comment.