DEV Community

Cover image for What is the layouts folder role in VueJS ?
Youssef Abdulaziz
Youssef Abdulaziz

Posted on

What is the layouts folder role in VueJS ?

I tried tackling Vue's layouts, searched the topic but still didn't find a clear answer so pls comment if you think you have the answer.

Top comments (2)

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

I have zero answer, but I don't think it is particularly fundamental. Why don't you start with what others do?

I started learning Vue this week. I am perfectly content with the file distribution created by Vite's npm create vite@latest. It basically has a /src folder where you put anything you want minified. Inside it, there's the assets folder that appears to be for static content you also want minified. Finally, it has the /public folder where you put assets that you want completely untouched.

So far, so good, I think.

Well, as I finished writing the comment, I realized: Probably the tooling you use for your project has something to say about the folder layout. I suppose that if I delete assets, most likely Vite's npm run build will complain.

Collapse
 
sem1colons profile image
Youssef Abdulaziz

I use Vite too , been using vue for about 1.5yrs or so. Never used a layout folder and it wasn't a problem.

Currently, I'm learning Vuetify and used their tool to build the project (which uses Vite under the hood) and their boilerplate project had a layout folder and was using layout components, so rn I'm trying to figure it out.