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

Tweak console dev #4133

Merged
merged 3 commits into from
May 16, 2019
Merged

Tweak console dev #4133

merged 3 commits into from
May 16, 2019

Conversation

ycjcl868
Copy link
Contributor

@ycjcl868 ycjcl868 commented May 6, 2019

开发环境下,console.log 可以使用,也可以 push。build 后自动删除(除 console.error

这样开发体验会好不少,一不注意写 console 后,提交会被 tslint 报错。

@ycjcl868 ycjcl868 changed the base branch from master to v4 May 6, 2019 13:57
@netlify
Copy link

netlify bot commented May 6, 2019

Deploy preview for ant-design-pro ready!

Built with commit 86a4f87

https://deploy-preview-4133--ant-design-pro.netlify.com

@chenshuai2144
Copy link
Collaborator

ci挂了

import { IConfig } from 'umi-types';

export default {
extraBabelPlugins: [['transform-remove-console', { exclude: ['error'] }]],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个和 uglify 的 drop_console 比哪个更快?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uglify 的好处是不用多装一个依赖。

@chenshuai2144 chenshuai2144 merged commit 80ce8fe into v4 May 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the tweak-console-dev branch May 16, 2019 11:06
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 this pull request may close these issues.

3 participants