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

feature request: Beautify log output and add screen clearing function #3

Closed
condorheroblog opened this issue Oct 24, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@condorheroblog
Copy link
Owner

嘿,最新版已经满足整体需求,还有些小优化需求,作者如果有空的话,帮看看 ❤️

mock文件故意写错代码,编辑器控制台会报红色的错误信息,如下图

image

可以选择使用类似下面的报错,让用户不觉得那么显眼

image

当然更好的是,当用户把错误的代码修改正常,vite-plugin-fake-server提供个类似clearScreen配置项,配置后可以自动把之前输出的错误信息清除就完美啦

Originally posted by @xiaoxian521 in #2 (comment)


To sum up the following two points:

  1. A log consistent with Vite style
  2. Add clear screen
@condorheroblog condorheroblog self-assigned this Oct 24, 2023
@condorheroblog condorheroblog added the enhancement New feature or request label Oct 24, 2023
@xiaoxian521
Copy link

nice 坐等作者更新版本和文档 😻

@condorheroblog
Copy link
Owner Author

shapes at 23-10-24 15 23 18

优化成上面这样了,基本上和 Vite 的表现一致。

v1.0.0 is released.

@xiaoxian521
Copy link

xiaoxian521 commented Oct 25, 2023

升级后 请求都404 可以使用 https://github.com/pure-admin/vue-pure-admin/tree/refactor/fake-server 代码复现哦
image

@condorheroblog
Copy link
Owner Author

我操作如下,没有复现,正常使用哇:

  1. 拉取 refactor/fake-server 的代码
  2. 升级 vite-plugin-fake-server 到 v1.0.0
  3. 安装依赖
  4. 启动项目
  5. 系统管理—用户管理页面复现
  6. 未复现

2023-10-25 12-48-52 2023-10-25 12_53_04

@xiaoxian521
Copy link

😂 嗯嗯 是因为我修改了mock文件 还在错误的基础之上加载文件导致的

@xiaoxian521
Copy link

最后一个问题 重启动会显示下图报错是什么原因呢🤔
image

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

No branches or pull requests

2 participants