错误:
解决方法:
错误:
解决方法:
vite.config.js添加以下代码:
optimizeDeps: {// 开发时 解决这些commonjs包转成esm包include: ["@jiaminghi/c-render","@jiaminghi/c-render/lib/plugin/util","@jiaminghi/charts/lib/util/index","@jiaminghi/charts/lib/util","@jiaminghi/charts/lib/extend/index","@jiaminghi/charts","@jiaminghi/color",],},build: {// 打包时需要另外处理的commonjs规范的包commonjsOptions: {include: [/node_modules/, // 必须包含],},},
解决方法见下文大佬的!
膜拜大佬:
Vite,Vue3项目引入dataV报错的解决方法_uncaught syntaxerror: the requested module '/node_-CSDN博客