Closed guguji5 closed 2 years ago
You probably need https://github.com/vite-plugin/vite-plugin-dynamic-import
And if it works in dev mode but not production mode, then it seems to be a vite problem.
You probably need https://github.com/vite-plugin/vite-plugin-dynamic-import
Thank you for your quick reply, I try this plugin, it still has error as before. as the document said "Dynamic import is not well supported in Vite" I am confused that I don't see require
function is called, but it throws error
Finally, I draw a button according your style. fetch the star number and render. https://github.com/n9e/fe-v5/commit/ff1ace4253db80c411d833707a1ae424e6f0bfc5
it works at vite development mode, but throw error in production mode
I guess it can't find the import function