From 0dfdace9236a1be0e74a8a4b298147f21e5a426a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Tue, 24 Jan 2017 21:38:43 +0800 Subject: [PATCH] Keep bundle size warning out of server side --- components/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/index.tsx b/components/index.tsx index 8de8930e30..2d726f2b11 100644 --- a/components/index.tsx +++ b/components/index.tsx @@ -1,7 +1,7 @@ /* eslint no-console:0 */ // this file is not used if use https://github.com/ant-design/babel-plugin-import if (process.env.NODE_ENV !== 'production') { - if (typeof console !== 'undefined' && console.warn) { + if (typeof console !== 'undefined' && console.warn && typeof window !== 'undefined') { console.warn(`You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.`); }