联系我们
简单又实用的WordPress网站制作教学
当前位置:网站首页 > 程序开发学习 > 正文

vite报 Dynamic require of “path“ is not supported 错误

作者:小教学发布时间:2023-09-25分类:程序开发学习浏览:59


导读:当引入path时报Dynamicrequireof“path”isnotsupported错误错误代码:解决:查看vite的版本如果是3.1.x不支持commo...

当引入path时报 Dynamic require of “path” is not supported 错误
错误代码:
Dynamic require of "path" is not supported 错误
解决:
查看 vite的版本如果是3.1.x不支持commonJS,所以要改为
import { } from ’ ’ 就可以了在这里插入图片描述
在这里插入图片描述





程序开发学习排行
最近发表
网站分类
标签列表