onnxruntime/js/web/script
Yulong Wang 0627a6cb93
[js/web] fix package export for bundlers (#23257)
### Description
<!-- Describe your changes. -->

This PR tries to fix #22615. (see detailed description in the issue)

A perfect solution would be too difficult to make, because there are a
huge number of combinations of usage scenarios, including combinations
of development framework, bundler, dev/prod mode, and so on.

This PR is using the following approach:
- Introduce a new type of end to end test: export test. This type of
tests are complete web apps that use popular web development frameworks,
and the tests are using puppeteer to run the apps and check if the apps
can run without error.
  - added one nextjs based web app and one vite based web app.
- In the test, perform the following test steps:
  - `npm install` for packages built locally
- `npm run dev` to start dev server and use puppeteer to launch the
browser to test
- `npm run build && npm run start` to test prod build and use puppeteer
to launch the browser to test
- Make changes to ort-web, including:
- special handling on Webpack's behavior of rewriting `import.meta.url`
to a `file://` string
  - revise build definitions
  - fix wasm URL for proxy, if used in a bundled build
2025-01-09 11:01:00 -08:00
..
build.ts [js/web] fix package export for bundlers (#23257) 2025-01-09 11:01:00 -08:00
generate-webgl-operator-md.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
generate-webgpu-operator-md.ts [JS/WebGPU] Add GatherBlockQuantized op support (#21734) 2024-08-26 14:46:04 -07:00
parse-profiler.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
prepack.ts [js] change default formatter for JavaScript/TypeScript from clang-format to Prettier (#21728) 2024-08-14 16:51:22 -07:00
pull-prebuilt-wasm-artifacts.ts JSEP: Use global-agent in scripts to enable using network proxy (#22537) 2024-10-24 16:27:11 -07:00
test-runner-cli-args.ts [js/webgpu] Manage model download with a specific unittest option (#22214) 2024-09-30 18:27:43 -07:00
test-runner-cli.ts [js/webgpu] Manage model download with a specific unittest option (#22214) 2024-09-30 18:27:43 -07:00
tsconfig.json [js/web] set noUnusedParameters to true and fix a few bugs (#18404) 2023-11-15 09:16:29 -08:00