Skip to content

Commit

Permalink
feat: 生产环境下自动移除开发日志
Browse files Browse the repository at this point in the history
  • Loading branch information
markthree committed May 7, 2022
1 parent 10add89 commit 70a362e
Show file tree
Hide file tree
Showing 4 changed files with 287 additions and 1 deletion.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
26. gzip 资源压缩支持
27. 环境变量配置支持
28. 统一的代码规范与风格支持
29. 生产环境自动移除开发日志

<br />
<br />
Expand Down Expand Up @@ -1186,6 +1187,15 @@ export default defineComponent({
由 [husky](https://github.com/typicode/husky) + [lint-staged](https://github.com/okonet/lint-staged) 提供的 `commit` 时校验。
<br />
<br />
### 29. [生产环境自动移除开发日志](https://github.com/dishait/vite-plugin-removelog)
生产环境下 `console.log``console.warn``console.error` 等日志会被自动移除掉,以避免开发时日志的泄漏。
具体可见 👉 [vite-plugin-removelog](https://github.com/dishait/vite-plugin-removelog)
<br />
<br />
<br />
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tov-template",
"version": "1.6.0",
"version": "1.7.0",
"description": "vite + vue3 + ts 开箱即用现代开发模板",
"scripts": {
"dev": "vite",
Expand Down Expand Up @@ -68,6 +68,7 @@
"vite-plugin-md": "^0.13.0",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-pages": "^0.23.0",
"vite-plugin-removelog": "^0.0.1",
"vite-plugin-restart": "^0.1.1",
"vite-plugin-use-modules": "^1.1.0",
"vite-plugin-vue-meta-layouts": "^0.0.9",
Expand Down
Loading

0 comments on commit 70a362e

Please sign in to comment.