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

如何判断页面userAgent来选择是否加载vconsole #12

Closed
hi500 opened this issue Jan 1, 2023 · 2 comments · Fixed by #18
Closed

如何判断页面userAgent来选择是否加载vconsole #12

hi500 opened this issue Jan 1, 2023 · 2 comments · Fixed by #18

Comments

@hi500
Copy link

hi500 commented Jan 1, 2023

在pc电脑端调试的时候,不希望有vconsole,因为vconsole会拦截console的log信息,不便于定位代码。
但是vite的配置文件中,启动的时候无法拿到浏览器的userAgent,这个问题怎么解决,只能是页面打开的时候再去判断是否初始化vconsole了吗

@vadxq
Copy link
Owner

vadxq commented Jan 2, 2023

这个似乎目前暂无法支持,后续参数优化的新版本可以考虑加上这个需求

@vadxq vadxq linked a pull request Jul 11, 2023 that will close this issue
@vadxq vadxq closed this as completed in #18 Jul 11, 2023
@vadxq
Copy link
Owner

vadxq commented Jul 11, 2023

可自定义规则来判断页面userAgent正式版发布啦,欢迎体验:vite-plugin-vconsole v2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants