CopyPlugin on Webpack configuration #19310
-
Hi all, I have a question regarding the configuration of webpack. I was following the example quick start onnxruntime web bundler and wanted to know if someone has an in depth explanation of the following lines: plugins: [new CopyPlugin({
// Use copy plugin to copy *.wasm to output folder.
patterns: [{ from: 'node_modules/onnxruntime-web/dist/*.wasm', to: '[name][ext]' }]
})], If that is excluded from the webpack configuration the example does not run and there is an error message |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, the "core" ONNXRuntime Inference code is made available on web by compiling them to WebAssembly binaries (.wasm files) -- these wasm files must be made accessible in the browser for the ORT-web package to work. This blog post goes more into detail about WebAssembly & its advantages |
Beta Was this translation helpful? Give feedback.
Hi, the "core" ONNXRuntime Inference code is made available on web by compiling them to WebAssembly binaries (.wasm files) -- these wasm files must be made accessible in the browser for the ORT-web package to work. This blog post goes more into detail about WebAssembly & its advantages