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
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 correctlyi'm new to deployment work. how can I make the changes you mentioned?
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
it works. Thaks