title: How to use p5js with Webpack
body: <p>I want to write a library based on <a href="https://github.com/processing/p5.js" rel="nofollow noreferrer">p5js</a>, so in my Javascript project I have <em>Webpack</em> installed as dev-dependency and I write this in <code>start.js</code>:</p>
  
  <pre><code>import p5 from "p5";
  
  p5.ellipse(0, 0, 100, 100); // Function not found :(
  </code></pre>
  
  <p>However, no references are found in <code>p5</code>. I was expecting to find references to p5's functions like <code>rect</code> or <code>ellipse</code> or <code>setup</code>, but nothing.</p>
  
  <h3>More info</h3>
  
  <p>My Webpack config file is:</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
      entry: './start.js',
      output: {
          filename: 'start.js',
          path: path.resolve(__dirname, 'out')
      },
      module: {
          rules: [
              /* In order to transpile ES6 */
              {
                  test: /\.js$/,
                  exclude: /(node_modules|bower_components)/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ['env']
                      }
                  }
              }
          ],  
      }
  };
  </code></pre>
  
  <p>What am I doing wrong?</p>