Has anyone had an issues with .well-known/ files not showing up properly in their railway builds?

my env: vite react web app. vite config: import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vitejs.dev/config/ export default defineConfig({ plugins: [react()], build: { sourcemap: true, outDir: 'build', }, publicDir: 'public', }) I am trying to setup our web app to verify apple universal links for our mobile apps. But it's not working. when I test locally running vite build and then vite preview it shows the config file fine, but after running my build in railway the deployed version of the app shows a 404 page when I try visiting the path. The file is .well-known/apple-app-site-association which apple requires not to have a .json file name. This is a commonly needed feature. I would appreciate any feedback if anyone has had any experience configuring .well-known files with railway before. I can't give access to the repo but I can spin up a example one if need be to demonstrate the issue. original issue: https://help.railway.app/questions/vite-public-well-known-folder-not-avail-a7ea8a05
vitejs
Configuring Vite
Next Generation Frontend Tooling
Railway Help Station
vite public .well-known folder not available
I am having issues where after running the vite build and deploying my vite app the .well-known/apple-app-site-association file is not showing up but instead it's showing a 404 page. After some searching I am seeing someone had this similiar issue with AWS Amplify, isn't railway built on AWS? Could there be some missing configuration? When I bui...
Solution:
https://github.com/brody192/vite-react-template use the Caddyfile and nixpacks.toml from this repo in yours...
Jump to solution
10 Replies
Percy
Percy5mo ago
Project ID: aa5f6f94-b4b8-4582-bfda-61de1da9b940
Sneep3r4476
Sneep3r4476OP5mo ago
aa5f6f94-b4b8-4582-bfda-61de1da9b940
Solution
Brody
Brody5mo ago
https://github.com/brody192/vite-react-template use the Caddyfile and nixpacks.toml from this repo in yours
Sneep3r4476
Sneep3r4476OP5mo ago
I will check it out thank you That worked Thanks!! @Brody
Brody
Brody5mo ago
awsome
Sneep3r4476
Sneep3r4476OP5mo ago
summary (my hypothesis of why it worked, still a little unfamiliar with these technologies), using caddy with nixpacks gives more control over the build process than using the lighter weight npm serve package I was using
Brody
Brody5mo ago
caddy doesn't have anything to do with the build process, it's just serving the built files serve is also not lightweight in terms of memory compared to caddy
Sneep3r4476
Sneep3r4476OP5mo ago
thanks for the correction wanting to learn what made this work. still not sure why vite wasn't working
Brody
Brody5mo ago
you used serve instead of a proper web server, now you are using caddy
Sneep3r4476
Sneep3r4476OP5mo ago
can you reopen the original ticket I will post the solution there. and modify my comments i didn't see any other tickets regarding .well-known
Want results from more Discord servers?
Add your server