Test Production Build Locally

923 Views Asked by At

I'm running into a bit of a wall and hoping for some help. It's probably something really simple that I'm overlooking. Our team is working on our lighthouse score, mainly focused on mobile optimization. Is it possible to actually build and serve those compiled files locally? What's the best way to do that and test what our performance is?

1

There are 1 best solutions below

0
Nathan On

Think of it from a high level, you are building your Vue application into a static website. Static websites only require a simple HTTP server. Therefore you can host and test this production build two different ways:

  1. With a simple local HTTP server (apache, nginx, node express), or you could use something like https://www.npmjs.com/package/http-server

  2. Host your production build online somewhere, such as https://pages.github.com/