title: Undefined error, when exporting a class
body: <p>I am new to react. And I created a demo project using external libraries without using npm. But when I export a class, it shows the error <code>exports is not defined</code>
  files are</p>
  
  <pre><code>  &lt;!DOCTYPE html&gt;
    &lt;html&gt;
     &lt;head&gt;
     &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"&gt;
     &lt;link rel="stylesheet"   href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-   awesome.min.css"&gt;
     &lt;link rel="stylesheet" href="css/style.css"&gt;
     &lt;link rel="stylesheet" href="css/login.css"&gt;
  
     &lt;!-- SCRIPTS Starts --&gt;
     &lt;!-- EXTERNALS --&gt;
  
     &lt;script    src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"&gt;         &lt;/script&gt;
     &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"&gt; &lt;/script&gt;
  
    &lt;script  src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.min.js"&gt; &lt;/script&gt; &lt;!-- 1 --&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom-server.min.js"&gt;&lt;/script&gt; &lt;!-- 2 --&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.min.js"&gt;&lt;/script&gt; &lt;!-- 3 --&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.34/browser.min.js"&gt;&lt;/script&gt; &lt;!-- 4 --&gt;
    &lt;script src="https://unpkg.com/react-router@3.0.0/umd/ReactRouter.js"&gt;&lt;/script&gt; &lt;!-- 5 --&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.16.1/axios.min.js"&gt;  &lt;/script&gt; &lt;!-- 6 --&gt;
  
    &lt;!-- EXTERNALS --&gt;
  
  
    &lt;script src="http://192.168.1.64:5011/js/dependencies/sails.io.js"&gt;&lt;/script&gt;
    &lt;script src="js/config.js"&gt;&lt;/script&gt;
    &lt;!-- Components --&gt;
    &lt;!-- &lt;script type="text/babel" src="js/components/loginComponent.js"&gt;   &lt;/script&gt; --&gt;
    &lt;script type="text/babel" src="js/components/logoutComponent.js"&gt;&lt;/script&gt;
    &lt;script type="text/babel" src="js/components/indexComponent.js"&gt;&lt;/script&gt;
     &lt;!-- &lt;script type="text/babel" src="react-2.js"&gt;&lt;/script&gt; --&gt;
  
     &lt;!-- SCRIPTS Ends --&gt;
    &lt;/head&gt;
    &lt;body&gt;
     &lt;div id="chat-react-app-index"&gt;&lt;/div&gt;
   &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><code>logout.js</code> error occurs when exporting <code>logout</code> class.</p>
  
  <pre><code>  console.log("Logout component &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;");
    export default class Logout extends React.Component {
  
    constructor(props) {
    super(props);
    //this.props.gender = this.state.gender;
    //this.handleInputChange = this.handleInputChange.bind(this);
    this.logoutClick = this.logoutClick.bind(this);
    //this.props.logouts = this.props.logouts.bind(this);
    console.log("this.props.loginslogouts");
    console.log(this.props.loginslogouts);
   }
  
   logoutClick() {
   console.log("logoutClick ============&gt;&gt;&gt;..");
   this.props.loginslogouts(true, false);
   var userName = JSON.parse(localStorage.getItem('userData') ).username;
   var userId = JSON.parse(localStorage.getItem('userData') ).userId;
   var userToken = JSON.parse(localStorage.getItem('userData')      ).userToken;
  var userProfilePic = JSON.parse(localStorage.getItem('userData')  ).userProfilePic;
  io.socket.request({
   method: 'POST',
   url: '/user/logout',
   data: {
     userId : userId,
   },
   headers: {
    'userToken':userToken
   }
  }, function (resData, jwres) {
  //this.setState({logout: false});
  console.log("Logout response -------- &gt;&gt;&gt;&gt;&gt;&gt;............");
  console.log(resData);
  if (resData.status == 1) {
     console.log("Logout Success");
    localStorage.removeItem("userData");
  }
  });
  }
  
  render() {
  return (
   &lt;div id="logoutClick" onClick = {this.logoutClick} className="row"&gt;
    &lt;a className="btn btn-primary"&gt;LOGOUT&lt;/a&gt;
   &lt;/div&gt;
  )
  }
  
  }
  </code></pre>
  
  <p><code>index.js</code></p>
  
  <pre><code>  var Router = ReactRouter.Router;
    var Route = ReactRouter.Route;
    var IndexRoute = ReactRouter.IndexRoute;
    var Link = ReactRouter.Link;
    var browserHistory = ReactRouter.browserHistory;
  
    console.log("Index component &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;");
    //import React, { Component } from 'react';
    //require('loginComponent');
    import Logout from './logoutComponent.js'
    class Index extends React.Component {
  
     constructor(props) {
      super(props);
     }
  
     render() {
        return (
          &lt;div&gt;
           &lt;Logout/&gt;
           INDEX
          &lt;/div&gt;
     )
    }
  
    }
  
     ReactDOM.render(
      &lt;Router history={browserHistory}&gt;
      &lt;Route path="/" component={Index} /&gt;
      &lt;Route path="/index" component={Index} /&gt;
      &lt;Route path="*" component={Index} /&gt;
      &lt;/Router&gt;,
     document.getElementById('chat-react-app-index')
    );
  </code></pre>