index.html cannot load js files when i generate page with nuxi generate

question is clear. I'm trying to generate my app as a static page but js files cannot load properly. i'm trying to serve it with xampp. i can see the page when i visit localhost/dist/ but js files inside the /localhost/dist/_nuxt folder and index.html try to fetch these files from localhost/_nuxt. i would really appreciate it if you could help me.
4 Replies
Smef
Smef6mo ago
Make sure your site root is set to /path/to/project/dist. Your server should show content at http://localhost not http://localhost/dist You may need to set your site root to .output/public depending on if xampp can handle the virtual linked /dist directory correctly
Yazılım Panteri
Yazılım PanteriOP6mo ago
i'm new to deployment work. how can I make the changes you mentioned?
Smef
Smef6mo ago
It's just a configuration in your xampp site settings. It's not a nuxt thing From a quick search - "85 Edit the httpd.conf file and replace the line DocumentRoot "/home/user/www" to your liked one. " But you should probably check the xampp docs
Yazılım Panteri
Yazılım PanteriOP6mo ago
it works. Thaks
Want results from more Discord servers?
Add your server