Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue import EZUIKit from 'ezuikit-js'; 运行失败 #214

Open
wlingf opened this issue Jun 11, 2024 · 7 comments
Open

vue import EZUIKit from 'ezuikit-js'; 运行失败 #214

wlingf opened this issue Jun 11, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@wlingf
Copy link

wlingf commented Jun 11, 2024

image

@wlingf
Copy link
Author

wlingf commented Jun 11, 2024

运行时控制台打印js文件内容

@wlingf wlingf changed the title vue import EZUIKit from 'ezuikit-js'; 运行时控制台打印js文件内容 vue import EZUIKit from 'ezuikit-js'; 运行失败 Jun 11, 2024
@Ran-wink
Copy link

请问解决了吗,我引入时也遇到了这样的问题

重复

@wlingf
Copy link
Author

wlingf commented Jun 12, 2024

请问解决了吗,我引入时也遇到了这样的问题

重复

没有 你这边有解决了 回复下

@ly112055
Copy link

同问,之前用的时候还是好的,不知道改啥了,突然又不行了,控制台直接打印js

@Ezviz-Open
Copy link
Member

Ezviz-Open commented Jun 12, 2024 via email

@freeshineit
Copy link
Collaborator

同问,之前用的时候还是好的,不知道改啥了,突然又不行了,控制台直接打印js

如果是老的vue2 项目,可以升级一下 vue-cli-service, webpack 项目可以把 ezuikit.js 加入到 babel-loader 中

@justJokee
Copy link

webpack4需要经过babel-loader处理才能正常import,如果此时还是出现unexpected token错误,需要调整下browserslist,一般 >1% last 2 versions就可以。
不过,既然已经输出了umd包,为什么还要让开发再走一遍babel,影响编译效率,这是源头问题,生产包的兼容性没处理好。

@freeshineit freeshineit added the bug Something isn't working label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants