onnxruntime/js/web/lib/onnxjs/backends/webgl
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
..
ops [js/web] WebGPU backend via JSEP (#14579) 2023-04-24 15:21:18 -07:00
glsl-array-lib.ts
glsl-coordinate-lib.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
glsl-definitions.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
glsl-encoding-lib.ts
glsl-fragcolor-lib.ts
glsl-function-inliner.ts
glsl-preprocessor.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
glsl-registered-libs.ts
glsl-shape-utils-lib.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
glsl-source.ts
glsl-vec-lib.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
inference-handler.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
op-resolve-rules.ts [js/web] add LRN unpacked kernel for webgl backend (#14459) 2023-02-01 11:51:10 -08:00
program-manager.ts [js] upgrade async@3.2.3 /js/ (#11421) 2022-05-03 23:41:36 -07:00
session-handler.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
texture-data-encoder.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
texture-layout-strategy.ts [js] upgrade async@3.2.3 /js/ (#11421) 2022-05-03 23:41:36 -07:00
texture-layout.ts [js] upgrade async@3.2.3 /js/ (#11421) 2022-05-03 23:41:36 -07:00
texture-manager.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00
types.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
utils.ts [js/web] WebGL backend refactor (#8586) 2021-08-12 12:30:49 -07:00
webgl-context-factory.ts [js/web] update webgl context creating (#16436) 2023-06-21 17:10:26 -07:00
webgl-context.ts [js/web] use esbuild to accelerate bundle build (#17745) 2023-10-06 13:37:37 -07:00