title: Can't resize image with Pica in Vue CLI application
body: <p>I want to resize image with Pica before uploading it to the server. I use <code>vue-upload-component</code> with this code <a href="https://github.com/lian-yue/vue-upload-component/blob/master/docs/views/examples/Avatar.vue" rel="nofollow noreferrer">https://github.com/lian-yue/vue-upload-component/blob/master/docs/views/examples/Avatar.vue</a> and everything works fine without the Pica.</p>
  
  <p>I overwrite the <code>inputFilter()</code> method to this:</p>
  
  <pre><code>inputFilter(newFile, oldFile, prevent) {
    if (newFile &amp;&amp; !oldFile) {
      if (!/\.(gif|jpg|jpeg|png|webp)$/i.test(newFile.name)) {
        this.alert("Your choice is not a picture");
        return prevent();
      }
    }
  
    if (newFile &amp;&amp; (!oldFile || newFile.file !== oldFile.file)) {
      newFile.url = "";
      let URL = window.URL || window.webkitURL;
      if (URL &amp;&amp; URL.createObjectURL) {
        newFile.url = URL.createObjectURL(newFile.file);
      }
    }
  
    const pica = Pica();
    const resizedCanvas = document.createElement("canvas");
    resizedCanvas.height = 100;
    resizedCanvas.width = 100;
  
    console.log(resizedCanvas);
    console.log(newFile.file);
  
    pica
      .resize(newFile.file, resizedCanvas)
      .then(result =&gt; console.log("resize done!"))
      .catch(error =&gt; {
        console.log("got error..");
        console.log(error);
      });
  }
  </code></pre>
  
  <p>and I see this in the console:</p>
  
  <pre><code>AvatarUpload.vue?df5a:178 &lt;canvas height=​"100" width=​"100"&gt;​
  AvatarUpload.vue?df5a:179 File {name: "img-913965899011452289.jpg", lastModified: 1473514866000, lastModifiedDate: Sat Sep 10 2016 15:41:06 GMT+0200 (czas środkowoeuropejski letni), webkitRelativePath: "", size: 179941, …}
  AvatarUpload.vue?df5a:185 got error..
  AvatarUpload.vue?df5a:186 TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
      at _iterableToArrayLimit (pica.js?824b:1636)
      at _slicedToArray (pica.js?824b:1632)
      at processStages (pica.js?824b:2126)
      at eval (pica.js?824b:2157)
  </code></pre>
  
  <p>I also added <code>vue.config.js</code> to my project:</p>
  
  <pre><code>module.exports = {
    configureWebpack: {
      resolve: {
        alias: {
          pica: "pica/dist/pica.js"
        }
      }
    }
  };
  </code></pre>
  
  <p>How to make the Pica works?</p>