[vite] Dynamic require of “path“ is not supported

Dynamic require of “path” is not supported error when introducing path

error code:

solve:

Check that the version of Vite may not support commonJS, so you need to change it to import { } from ' '

vite.config.ts

Guess you like

Origin blog.csdn.net/weixin_46413834/article/details/128896524