Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web] warning about the use of eval in Vite #22156

Open
jclaessens97 opened this issue Sep 19, 2024 · 2 comments
Open

[Web] warning about the use of eval in Vite #22156

jclaessens97 opened this issue Sep 19, 2024 · 2 comments
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@jclaessens97
Copy link

Describe the issue

Whenever I build with Vite I get the following warning message:

image

To reproduce

  1. Install onnxruntime-web
  2. Build application with Vite

Urgency

No response

ONNX Runtime Installation

Released Package

ONNX Runtime Version or Commit ID

1.19.2

Execution Provider

'webgl' (WebGL)

@jclaessens97 jclaessens97 added the platform:web issues related to ONNX Runtime web; typically submitted using template label Sep 19, 2024
@fs-eire
Copy link
Contributor

fs-eire commented Sep 19, 2024

The only eval is introduced by dependency protobufjs:
https://github.com/protobufjs/protobuf.js/blob/master/lib/inquire/index.js#L12

@fs-eire
Copy link
Contributor

fs-eire commented Sep 19, 2024

We still need protobufjs if using WebGL.

If using CPU only, you can import onnxruntime-web/wasm
If using WebGPU, you can import onnxruntime-web/webgpu

They both do not depend on protobufjs and there should be no eval() in the corresponding bundles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants