title: Assets in Vue app not loading when published to Github pages
body: <p>I'm publishing my SPA that I'm making with Vue and Buefy to my a <code>gh-pages</code> branch a of private repo, just so I can test if everything will load normally. </p>
  
  <p>Later, I'll upload the finished website to the actual public repo, which is tied to my custom URL (I'm redesigning the website from scratch, using a diff tech).</p>
  
  <p>Since Vue websites needs to be built for distribution, I'm using an NPM package to do this for me: <a href="https://github.com/KieferSivitz/vue-gh-pages" rel="nofollow noreferrer">https://github.com/KieferSivitz/vue-gh-pages</a></p>
  
  <pre><code>"deploy": "node ./node_modules/vue-gh-pages/index.js --branch gh-pages -m \"Deploy to gh-pages.\""
  </code></pre>
  
  <p>When deploying the website, it loads only partially. The images won't load, and the router will not work (links to other pages won't work).</p>
  
  <p>I'm storing images in the <code>assets</code> folder, and using <code>require('@/assets/logo.png')</code> to load them (at least it works with localhost).</p>
  
  <p>The images are trying to be loaded from <code>https://&lt;username&gt;.github.io/img/logo.d2151712.png</code>.</p>
  
  <p>I read that I would need to set the <code>publicPath</code> to my project name, since currently the website is being served from <code>https://&lt;userName&gt;.github.io/&lt;projectName&gt;/</code>, but with that, the whole website is 404-ing.</p>
  
  <p>With that property, the whole website would try to load from <code>https://&lt;username&gt;.github.io/&lt;projectName&gt;/&lt;projectName&gt;</code>.</p>
  
  <p>I think that somewhere, there's a setting adding <code>&lt;projectName&gt;</code> to router, but not adding elsewhere.</p>
  
  <h3>Edit</h3>
  
  <p>I tried to force <code>vue-router</code> to get the correct base, without setting the <code>publicPath</code>:</p>
  
  <pre><code>base: "&lt;projectName&gt;/", //process.env.BASE_URL,
  </code></pre>
  
  <p>But the routes are stil not working, since I'm lazy loading them using <code>import("@/views/Page.vue")</code>.</p>