-
Notifications
You must be signed in to change notification settings - Fork 405
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
启用按需加载后报错 提示Menu is not defined #172
Comments
Please provide the code for reproduce. |
I do have a demo repo for the same error. clone and npm install and
|
I had this problem too. antd: 2.13.7 And I have tried to I found that: import {Layout} from 'antd'
const {Header, Footer, Content} = Layout
render(){
<Layout>
<Header></Header>
<Content></Content>
<Footer></Footer>
</Layout>
} It's OK. import {Layout} from 'antd/lib/layout'
render(){
<Layout>
<Layout.Header></Layout.Header>
<Layout.Content></Layout.Content>
<Layout.Footer></Layout.Footer>
</Layout>
} It's OK. import {Layout} from 'antd'
render(){
<Layout>
<Layout.Header></Layout.Header>
<Layout.Content></Layout.Content>
<Layout.Footer></Layout.Footer>
</Layout>
} It will throw error: |
关闭webpack react生产模式核心压缩功能即不会报错。 new webpack.DefinePlugin({ |
hmm. then how make antd work on NODE_ENV=production? |
@zhi3210happy 相同的情况 |
Hi, we encounter similar issues while running our test with coverage enabled... import { Menu } from 'antd';
const { Item } = Menu;
While import { Menu } from 'antd';
const Item = Menu.Item;
|
Did anyone resolved this Reference Error: is not defined? I am having the same issue. I am testing antd/antd-mobile with Meteor React Apollo server. After installing babel-plugin-import, recommended by the official doc. This error came up. |
got the same problem after package a win32 distribution version. |
find a way to solve this problem. |
when I use it ,conslelog error
Menu is not defined
The text was updated successfully, but these errors were encountered: