当引入path时报 Dynamic require of “path” is not supported 错误
错误代码:
解决:
查看 vite的版本可能不支持commonJS,所以要改为 import { } from ' ' 就可以了
vite.config.ts
当引入path时报 Dynamic require of “path” is not supported 错误
错误代码:
解决:
查看 vite的版本可能不支持commonJS,所以要改为 import { } from ' ' 就可以了
vite.config.ts