Open ricky0123 opened 4 weeks ago
Hi @ricky0123
Nextjs is a react-native application, have you tried using the packages in onnxruntime-react-native instead?
Hi @prathikr that's not quite correct, nextjs is a framework for building websites based on react. React-native is for building mobile applications
@ricky0123 looks like there are many issues with webpack bundler. We are tracking with https://github.com/microsoft/onnxruntime/issues/22615
Sorry, I am unable to provide any quicker resolution. Please track the above PR as this will be a big change on our end to clean up webpack support.
Hi, I maintain a library that depends on onnxruntime-web that people frequently use with nextjs. I maintain a nextjs example here. However, I am struggling to package it properly. Right now, I copy all the necessary wasm files to the public directory using a webpack plugin. It does run properly using next's "dev" script, but when I try to create a production build using the
build
script, I get the error shown below. Is there an official nextjs example? Do you have any tips for packaging onnxruntime-web within nextjs apps?