I'm using NuxtJS v2 and I'm having an issue trying to rename the file app.template.html to index.html in .nuxt/views folder. i've looked into the documentation in here but with no progress, any help will be appreciated.
Asked
Active
Viewed 98 times
0
-
`.nuxt` folder is automatically generated by Nuxt - you are not supposed to modify any file there as it will be overwritten next time you (re)start Nuxt. – IVO GELOV Jun 29 '22 at 12:32
-
Thanks for your answer, and yes i'm aware of this behavior, and i do want the file name to be changed to index.html on every build of the project, is there a way to do that? – Nour Basha Jun 29 '22 at 12:41
-
Why do you want such thing? You could always use a post build script with some `mv` command in there. – kissu Jun 29 '22 at 13:18
-
@kissu for DevOps purposes, i want the entry point for the project to be index.html, as in a normal VueJS project (dist/index.html), but in NuxtJS there's no index.html – Nour Basha Jun 29 '22 at 14:06
-
Because you're looking for `index.html` into `.nuxt` instead of `/dist`. Just run `npm run generate` and watch the magic happens. – IVO GELOV Jun 29 '22 at 16:00
-
1`npm run generate` is for target: static, my project is target: SSR, `npm run genrate` wouldn't work in that case, i have to use `npm run build` – Nour Basha Jun 29 '22 at 18:49