title: Why do I have to list my peerDependencies as externals in the webpack config when creating a package?
body: <p>I was creating an npm package in React, using create-react-app. Since <code>react</code> and <code>react-dom</code> are assumed to be in the host project, I listed them as peerDependencies and devDependencies in my package.json.</p>
  
  <p>I learned that this way the two still get bundled, and to prevent that I have to list them in the externals of the webpack config, which I did succesfully:</p>
  
  <pre><code>externals: {        
    react: {          
        commonjs: 'react',          
        commonjs2: 'react',          
        amd: 'React',          
        root: 'React',      
    },      
    'react-dom': {          
        commonjs: 'react-dom',          
        commonjs2: 'react-dom',          
        amd: 'ReactDOM',          
        root: 'ReactDOM',      
    },  
  },
  </code></pre>
  
  <p>My question is: why do I have to go through this second step? Shouldn't listing them as peerDependencies be sufficient? And if not, how do peerDependencies differ from the regular dependencies in that case?</p>