How can I use model-viewer in Vite + React

I download the official model-viewer demo,and I wan’t use it in my personal project.In react strict mode,the createGraphicsDevice can’t get a right device.Like this:


the shader is null,I have no idea to fix this

I resolved this bug,remove the prerender