当前位置: 代码迷 >> 综合 >> vue引用警告 “export ‘default‘ (imported as ‘vant‘) was not found in ‘./utils/vant‘
  详细解决方案

vue引用警告 “export ‘default‘ (imported as ‘vant‘) was not found in ‘./utils/vant‘

热度:71   发布时间:2023-12-08 05:06:10.0

想按需引入vantUI库时,main.js文件引入错误在这里插入图片描述
问题原因:ES6 编译器识别问题
解决方法:

import vant from './utils/vant'

改为

import * as vant from './utils/vant'
  相关解决方案