title: Properly expose function in webpack build so HTML can access it
body: <p>I just was introduced to webpack and not sure how to do something very basic. </p>
  
  <p>This is my webpack file.</p>
  
  <pre><code> const webpack = require('webpack');
      module.exports = {
      resolve: {
          extensions: ['.ts', '.js']
      },
      entry: "./src/game.ts",
      output: {
          path: __dirname, 
          filename: "myGame.js"
      },
      module: {
          loaders: [
              { 
                  test: /\.ts$/,
                  loader: ['awesome-typescript-loader?tsconfig=tsconfig.json']
              },
              {
                  test: /\.css$/,
                  loader: 'style-loader!css-loader'
              }
          ]
      }
  }
  </code></pre>
  
  <p>Here is my markup file.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Tic tac toe&lt;/title&gt;
          &lt;link rel="stylesheet" href="assets/styles.css"&gt;
          &lt;script src="game.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
          &lt;div class="center"&gt;
              &lt;button type="button" onclick="resetGame()"&gt;
                  New game
              &lt;/button&gt;
          &lt;/div&gt;
          &lt;div class="container"&gt;
              &lt;div&gt;
                  &lt;div class="cell" onclick="cellClicked(event, 0, 0)"&gt;&lt;/div&gt;
                  &lt;div class="cell" onclick="cellClicked(event, 1, 0)"&gt;&lt;/div&gt;
                  &lt;div class="cell" onclick="cellClicked(event, 2, 0)"&gt;&lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/body&gt;
      &lt;script src="game.js"&gt;&lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How will my mark up know what cellClicked and reset functions are? </p>
  
  <p>I know I can set them to window object and then it will know but it feels like a bad design. </p>
  
  <p>Can anyone help me understand webpack since it feels I have no handle on it.</p>
  
  <p>Thanks you for your help.</p>