vite2 编译后运行报错 提示 "xxx is not a constructor"

来源:4-4 Rollup 配置文件使用

gongyangxu

2021-12-30

vite2 vue3 项目 npm run dev 本地运行正常,
npm run build 打包成dist后,运行报错,提示 "xxx is not a constructor"
引入。moment axios 打包后运行就报错,需要配置什么吗

写回答

1回答

Jokcy

2022-01-03

xxx具体是什么?

0
1
gongyangxu
上面的问题解决了 axios 改成这种引用 import axios from 'axios/dist/axios'
2022-01-04
共1条回复

Vite 从入门到精通,玩转新时代前端构建法则

从使用到原理到实战的【前端构建】高效学习路线,一次性掌握Vite

794 学习 · 105 问题

查看课程