title: Platform Specific Code with Webpack - React Native
body: <p>I have been fighting with this trying to find a solution and trying solutions left and right, and I can't seem to figure this one out.</p>
  
  <p>With React Native we have .ios and .android file extensions. Each of which the React Native packager will handle for us. Now, I'm using webpack (because I love to torture myself) and I cannot get it to resolve the filename extensions properly. Using the React Native Webpack Server (which there seemed to be no solution for this), it returns an error that looks similar to this:
  <a href="https://i.stack.imgur.com/bxTBJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bxTBJ.png" alt="enter image description here"></a></p>
  
  <p>This is due to there being a .ios and .android file being called as: require('Spinner'); The React Native packager will resolve these files, webpack will not. I need to mix these two to get this to work, or is there now a magical solution to where I don't have to use webpack at all anymore.</p>
  
  <p>I think I'm getting my point across with this alone, and wondered if there is a webpack extension or a resolve alias I can use to fix this issue. If needed I will post my webpack setup here.</p>