mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
use less strict console.warn
This commit is contained in:
parent
bb13746400
commit
8f7fdb8489
@ -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.',
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user