search

Home  >  Q&A  >  body text

After restarting the nuxt.js server, the "layouts\default.vue" file will be reset

<p>I'm currently trying to learn vue.js and nuxtjs server on localhost:3000. </p> <p>I found a problem, whenever I create a new <strong>"xxxx.vue"</strong> file in the "pages" directory or restart the nuxt.js server, the server generates A new <strong>"default.vue"</strong>file to replace my old file <strong>(in \layouts\default.vue)</strong>. </p> <p>How to solve this problem? Is there a way to stop it from generating a new file to replace it? Thank you so much! </p>
P粉521013123P粉521013123459 days ago445

reply all(1)I'll reply

  • P粉805931281

    P粉8059312812023-08-27 10:32:38

    If you modify the .nuxt\layouts\default.vue file, it will be reset after the development server is restarted. If you want to modify the layout, please ignore this file and create (or copy) a layouts\default.vue file in your root directory and modify the file.

    reply
    0
  • Cancelreply