title: How do I use .babelrc to get babel-plugin-import working for antd?
body: <p>I'm new to react, babel, and antd.</p>
  
  <p>I installed react and started a project using create-react-app.
  I installed antd (ant.design).  It suggests using babel-plugin-import, so I installed that too.</p>
  
  <p>If I interpret it right, the usage documentation for babel-plugin-import says to put this in a .babelrc file:</p>
  
  <pre><code>{
    "plugins": [
      ["import", {
        "libraryName": "antd",
        "style": true
      }]
    ]
  }
  </code></pre>
  
  <p>I'm having trouble getting it to work.  My web console still has the warning:</p>
  
  <blockquote>
    <p>You are using a whole package of antd, please use
    <a href="https://www.npmjs.com/package/babel-plugin-import" rel="noreferrer">https://www.npmjs.com/package/babel-plugin-import</a> to reduce app bundle
    size.</p>
  </blockquote>
  
  <p>I didn't have a .babelrc file in my project's directory, so I created one with the above contents and restarted my server (npm start).  That didn't work, so I created one in myProject/node_modules/babel_plugin_import but that doesn't work either.</p>
  
  <p>Where is that code snippet supposed to go?</p>
  
  <p>At the bottom of <a href="https://github.com/ant-design/babel-plugin-import" rel="noreferrer">https://github.com/ant-design/babel-plugin-import</a> it says</p>
  
  <blockquote>
    <p>babel-plugin-import will be not working if you add the library in
    webpack config vender.</p>
  </blockquote>
  
  <p>But I don't know what that means.</p>
  
  <p>I asked another question here: <a href="https://stackoverflow.com/questions/44035080/how-to-get-antd-working-with-app-created-via-create-react-app">How to get antd working with app created via create-react-app?</a>
  Maybe this problem has something to do with my project created via create-react-app??</p>