https://kotlinlang.org logo
Title
r

Raphael TEYSSANDIER

06/30/2022, 5:42 PM
Hello, I would to make a jar with shadowJar of Ktor + Vue.js. But Vue.js is not working with the jar. Any idea ?
b

Big Chungus

06/30/2022, 6:10 PM
I'm placing all my static resources inside WEB-INF subdirectory within the jar.
Change that as appropriate
Ignore files() and default() lines if you don't care about supporting serving resources from the working directory too
r

Raphael TEYSSANDIER

06/30/2022, 8:24 PM
Thank you ! It works
It work with the jar build in local, but not when deployed
b

Big Chungus

06/30/2022, 9:42 PM
Extract your final jar and make sure that resources are placed in the correct folder. I have this setup running in production for ages so it definitely works
Also note that gradle's run task does not use the same classpath as your jar in production
r

Raphael TEYSSANDIER

07/01/2022, 7:26 AM
Yes, I added my front folder into resources, and I told ktor to use resources, and it works !