use less strict console.warn

This commit is contained in:
afc163 2017-03-29 15:47:31 +08:00
parent bb13746400
commit 8f7fdb8489

View File

@ -1,11 +1,12 @@
// this file is not used if use https://github.com/ant-design/babel-plugin-import
import warning from './_util/warning';
const ENV = process.env.NODE_ENV;
if (ENV !== 'production' && ENV !== 'test') {
warning(
false,
'You are using a whole package of antd,' +
if (ENV !== 'production' &&
ENV !== 'test' &&
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.',
);
}