vite报 Dynamic require of “path“ is not supported 错误
作者:小教学发布时间:2023-09-25分类:程序开发学习浏览:100
导读:当引入path时报Dynamicrequireof“path”isnotsupported错误错误代码:解决:查看vite的版本如果是3.1.x不支持commo...
当引入path时报 Dynamic require of “path” is not supported 错误
错误代码:
解决:
查看 vite的版本如果是3.1.x不支持commonJS,所以要改为
import { } from ’ ’ 就可以了
- 程序开发学习排行
- 最近发表