Skip to content

Commit

Permalink
[js/web] add "browser" field to support parcel v2 (microsoft#20422)
Browse files Browse the repository at this point in the history
### Description

As described in latest discussion in microsoft#19915, parcel v2 without using the
[new resolver](https://parceljs.org/blog/v2-9-0/#new-resolver) will not
work correctly with onnxruntime-web. There are still users who uses
parcel with default resolver, so add this deprecated field "browser"
back for backward compatibility. This PR also corrects the "main" field,
which is for old resolver for Node.js.
  • Loading branch information
fs-eire authored Apr 23, 2024
1 parent 13bda11 commit 8f53957
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
"numpy-parser": "^1.2.3",
"strip-json-comments": "^5.0.0"
},
"main": "dist/ort-web.node.js",
"main": "dist/ort.node.min.js",
"browser": "dist/ort.min.js",
"exports": {
".": {
"node": "./dist/ort.node.min.js",
Expand Down

0 comments on commit 8f53957

Please sign in to comment.