Vue js引用警告 “export ‘default‘ (imported as ‘xxx‘) was not found

问题原因:ES6 编译器识别问题

如果在public.js这样写会有警告export 'default' (imported as 'xxx') was not found

export const myMixin= {}

解决办法:修改组件中引用js的地方

将 import Public from './public'
改成 import * as Public from './public'

  

posted @ 2022-03-31 09:56  seven&night  阅读(1450)  评论(0编辑  收藏  举报