Nuxt 3 assets not availables on the server during the build


I have some assets on my assets/ folder of my nuxt 3 project.

When I call them via a css file using “~” syntax, it works on local by do not work on netlify :
url('~/assets/fonts/icomoon.woff2') format('woff2');
I get this during the build :

You have to know that the css file who call the woff3 files is loaded on the project by the nuxt.config.js file

      "~/assets/css/icomoon.css", // him

Before getting this error, I used this syntax in the css file :

(I moved it on a fonts folder but see that I don’t write the “~/assets/”)
But with this syntax, I get an error on my browser console saying that it do not find the font.

deploy id : 6325b0ec9c51cc3c20f77119
site id : 7b5081b1-e3f7-4b53-a54c-f2e35dc4b816

Hi @dbconception

Unfortunately screenshots don’t facilitate good debugging. Can you share the repository you are deploying from?

After reading again the doc. I move my fonts folder to the public folder. And call fonts using “/fonts/icomoon.woff” and it works

It resolve my issue