wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
12.79k stars 1.14k forks source link

Improve our docs on `resolveProjectPath` helper #1874

Open infomiho opened 4 months ago

infomiho commented 4 months ago

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

infomiho commented 4 months ago

Another instance where better docs could have probably helped: https://ptb.discord.com/channels/686873244791210014/1216762336086593617/1216762336086593617

Martinsos commented 4 months ago

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.

Martinsos commented 4 months ago

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.

Martinsos commented 3 months ago

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.

Martinsos commented 1 week ago

Another person having the issue here: https://discord.com/channels/686873244791210014/1257365471666114651/1257365471666114651 .