diff --git a/index.js b/index.js index ab328b01e3..64efa2904e 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,9 @@ const antd = { Card, LocaleProvider, Transfer, Cascader, }; -console.warn(`you are using prebuild antd, +if (typeof console !== 'undefined' && console.warn) { + console.warn(`you are using prebuild antd, please use https://github.com/ant-design/babel-plugin-antd to reduce app bundle size.`); +} export default antd;