What is this path pointing at: <https://gitlab.com...
# opensavvy
I think this path is pointing one level over the root project directory. It's definitely wrong. Shouldn't it point to
build/processedResources/js/main
instead?
I've "fixed" that and now it doesn't work at all 🙂 Css support is broken because now Vite thinks I'm importing static assets.
As we already have all the assets inside the kotlin directory, I think we don't need
publicDir
at all. Setting it to "" doesn't serve random files from my hard drive and still works.
c
I think this path is pointing one level over the root project directory. It's definitely wrong.
It should be pointing to the project root, because that's where the sources are (I need to figure out a better way to get them to worlk)
r
Why do you need to serve sources? For source maps?
c
Yes
But it doesn't seem to work at the moment. My current plan is to rewrite the task that generates the working directory (to also solve your path issues) and have it also copy the sources there.
r
Perhaps it doesn't work because the path is wrong? One
/..
too much.
c
Do you have a way to know? I haven't figured out in the doc what path that's relative to.
r
it's relative to the base path, which is our
build/vite/dev/kotlin
. When changing the code to
publicDir.convention("../../../..")
I can open http://localhost:3000/src/webMain/kotlin/website/main.kt
👍 1
c
Yep, this does fix the source maps, nice