After shifting from CRA to VITE, I am encountering a problem with serving my app.
I successfully build my app using vite build
. and can serve it using Vite serve
without any issues.
However, I want to use npm's serve
command. Whenever I run vite build
and then try npm's serve /dist/
,
I encounter multiple "Failed to fetch dynamically imported module" errors.
It seems like the issue lies in trying to locate the entry.js files at http://localhost:3000/my-component.entry.js
Any suggestions on how to resolve this would be greatly appreciated.