Home > OS >  How to Build Vue 3 Vite App for production
How to Build Vue 3 Vite App for production

Time:07-02

I created a fresh vue project with the new version which includes vite init.

When I run npm run build a dist/ is created. But when I open dist/index.html inside the dist folder it doesn't show anything. My question is how can I build the app and run it without any command (Building for production). Thanks

CodePudding user response:

You need a server, otherwise assets will fail to be found and you'll get errors and a blank page. Use npm run preview.

  • Related