onnxruntime
f5654ed8 - [Web] Magic import comment missing for Vite (/* @vite-ignore */) (#25919)

Commit
72 days ago
[Web] Magic import comment missing for Vite (/* @vite-ignore */) (#25919) ### Description This is a small change that includes the insertion of the `/* @vite-ignore */` magic comment within the `build.ts` `postProcess` function, alongside `/* webpackIgnore:true */`, for dynamic imports. `/* @vite-ignore */` suppresses a Vite warning: > The above dynamic import cannot be analyzed by Vite. See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats. If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning. , and does not change other behaviour. Note that it must be included as a separate, distinct comment to match the [regexp](https://github.com/vitejs/vite/blob/bcc31449c0c4f852ccb1eedda1842bc7ded23d01/packages/vite/src/node/plugins/importAnalysis.ts#L88). ### Motivation and Context Resolves #25918. The Vite magic comment should be included because the dynamic imports are intended 'to be left as-is', and the warning cannot otherwise be disabled by an end-user (myself in an Angular project).
Author
Parents
Loading