onnxruntime/js/web/lib/onnxjs
Yulong Wang 6ea493571e
[js/web] use esbuild to accelerate bundle build (#17745)
### Description

Use esbuild to accelerate bundle build.

This change uses esbuild to replace webpack for onnxruntime-web. Bundle
build time reduced from ~20sec to ~0.6sec on my windows dev box.

A few changes applied:
- import nodejs modules using "node:" prefix
- remove enum declaration inside namespace (EncoderUsage)
- use "fs/promise" to replace the old promisify from "util"
- separate ort-web and test-runner. Previously they are bundled
together, now they are built into 2 files.
- optimize karma runner launch time
- remove unnecessary sourcemap preprocessor. sourcemaps are handled
inside esbuild
- remove unnecessary proxies (because ort-web and test-runner are
separated now, the path are correctly inferred)
    - remove file watcher for test data
- optimize special handling as esbuild plugins:
- polyfill dummy imports for node.js modules when targetting browser.
    - load as content string for ort-wasm-*.worker.js
    - load as content string for ./proxy-worker/main.ts
- a source patch to ort-wasm*-threaded*.js (see details in comments in
code)
- updated debug configurations for sourcemap mapping to ensure
out-of-box good dev experience
2023-10-06 13:37:37 -07:00
..
backends [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
ort-schema [js] enable formatter for more file types (#16888) 2023-07-28 15:46:58 -07:00
attribute-with-cache-key.ts
attribute.ts [js/web] upgrade onnx-proto version (#16722) 2023-07-18 16:36:39 -07:00
backend.ts [js/web] WebGPU backend via JSEP (#14579) 2023-04-24 15:21:18 -07:00
execution-plan.ts
graph.ts Fix Resize op input check (#16594) 2023-08-09 15:42:30 -07:00
instrument.ts [js] upgrade dependencies and enable strict mode (#14930) 2023-03-22 15:05:04 -07:00
model.ts [js/web] upgrade onnx-proto version (#16722) 2023-07-18 16:36:39 -07:00
operators.ts
opset.ts [js/web] WebGPU backend via JSEP (#14579) 2023-04-24 15:21:18 -07:00
session-handler.ts Add training interfaces to js/common (#17333) 2023-09-29 19:05:10 -07:00
session.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
tensor.ts js/webgpu: argmax,argmin,softmax support (#16882) 2023-08-02 18:16:19 -07:00
util.ts js/webgpu: argmax,argmin,softmax support (#16882) 2023-08-02 18:16:19 -07:00