-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Web] issues bundling onnxruntime-web
using webpack.
#14504
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
onnxruntime-web
using webpack. onnxruntime-web
using webpack.
if we do:
if the expectation is that users pick the pre-built files from |
cc @fs-eire |
@fs-eire , i notice there were some PR's referencing this issue. do these PR's fix the issue we observed for ort-web ? if you have a new package version that you would like me to try out plz let me know cc @parinitarahi , @faxu |
It may take a few days for the nightly build being available on NPM. if you want to test if this change is working or not, simply remove the "module" field in file node_modules/onnxruntime-web/package.json from your code base and try it again. |
thanks @fs-eire for taking a look at this issue. once the package becomes available on NPM I will give it a try . presently, the latest "dev" version is from 3 days ago: |
tried this. but i hit the same compile time error above. |
issue is fixed in #14532 and validated in |
@abgoswam were you able to use this additionally tried the most recent, |
i was able to get past that error with: cc @neiz |
Describe the issue
We have a example of using
onnxruntime-web
in a standalone TS fileHowever when we have the same code inside a
webpack
bundler, we hit compile time errors:Root cause:
onnxruntime-web
should point todist/ort-web.node.js
instead of trying to recompile fromlib/index
node_modules/onnxruntime-web/dist/ort-web.node.js
instead ofnode_modules/onnxruntime-web/lib/index.ts
onnxruntime-web
(?)Approaches tried
require('onnxruntime-web/dist/ort-web.node.js')
Summary
Bundling
onnxruntime-web
using webpack seems to hit compile issues.Would it be possible to have an example which shows how to force webpack to pick the path from
dist
(notlib
) ?To reproduce
onnxruntime-web@1.13.1
Urgency
we have a hacky approach that works. would be good to figure out the correct way of doing this
ONNX Runtime Installation
Released Package
ONNX Runtime Version or Commit ID
1.13.1
Execution Provider
WASM
The text was updated successfully, but these errors were encountered: