nuxt / website-v2

Nuxt 2 Documentation Website

Home Page:https://v2.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static folder in Nuxt 3

Agusnez opened this issue · comments

Hi! I noticed that on the oficial documentation it says that /static is the default static folder for Nuxt similar to the /assets directory for Webpack. (also available in Nuxt, by the way). But since Nuxt uses Vite, the documentation of Vite says that it uses /public as the static folder.

I have tested both folders in Nuxt 3 and seems that the Vite documentation is right and the /static folder does not work for me.

What could be happening?

Hi @Agusnez
I think you got the wrong documentation. For Nuxt v3, you have to refer to https://v3.nuxtjs.org/docs/
And it says to use /public: https://v3.nuxtjs.org/docs/directory-structure/public

@smarroufin You are right. I got it completely wrong 🤦‍♂️. Thanks for clarifying it.