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
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:Jump to solution
https://github.com/brody192/vite-react-template
use the Caddyfile and nixpacks.toml from this repo in yours...
10 Replies
Project ID:
aa5f6f94-b4b8-4582-bfda-61de1da9b940
aa5f6f94-b4b8-4582-bfda-61de1da9b940
Solution
https://github.com/brody192/vite-react-template
use the Caddyfile and nixpacks.toml from this repo in yours
I will check it out
thank you
That worked Thanks!!
@Brody
awsome
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
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
thanks for the correction
wanting to learn what made this work.
still not sure why vite wasn't working
you used serve instead of a proper web server, now you are using caddy
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