Open infomiho opened 4 months ago
Another instance where better docs could have probably helped: https://ptb.discord.com/channels/686873244791210014/1216762336086593617/1216762336086593617
Another instance where better docs could have probably helped: https://ptb.discord.com/channels/686873244791210014/1216762336086593617/1216762336086593617
Here, users had an issue adding fontsource fonts, since Vite by default doesn't look in the place where these fonts reside once installed via npm.
Here is another person having similar issue ("The request URL "xxx" is outside of Vite serving allow list"), but they are not trying to use fonts, they are instead trying to use images.
https://discord.com/channels/686873244791210014/1216865427729289338/1216865427729289338
This makes me wonder if we should be looking into modifying the defaults, so that Vite by default pick up these files, if people are hitting these issues.
Another person that seems to have similar problem (this time importing CSS): https://discord.com/channels/686873244791210014/1217414076569751563/1217414076569751563 , I have to yet confirm this was the cause though, but it seems so at first glance.
Another person having the issue here: https://discord.com/channels/686873244791210014/1257365471666114651/1257365471666114651 .
Wasp exposes a helper called
resolveProjectPath
that is used to bridge the gap:We mention it in the Tailwind setup docs: https://wasp-lang.dev/docs/project/css-frameworks#enabling-tailwind-step-by-step
We don't mention it standalone or explain it at all, but it's necessary for any path definitions in the Vite config file as well. It proved crucial for some part of Vite config to solve this issue: https://gist.github.com/infomiho/9682e664948b84112074a69268f5673a