S
SolidJS10mo ago
w4lker

Deployed in Vercel, but doesnt load CSS files

I am developing with Solid Start, try to deploy with GitHub Pages and Vercel. I'm looking to deploy, it doesn't matter which one I use. With Vercel I overwrote the output directory to .output/public (before it was in .output and it gave me a 404 assuming it couldn't find the index.html) after overwriting, I was able to get it to take the index.html but it didn't load the files. CSS files. With GitHub Pages in the main.yaml of the workflow I do specify the same output, but it shows me the root Readme. could you help me plz? 🙏
8 Replies
brenelz
brenelz10mo ago
Have you set it to use the vercel preset? In app.config.ts
brenelz
brenelz10mo ago
SolidStart Beta Documentation
SolidStart Beta Documentation
Early release documentation and resources for SolidStart Beta
w4lker
w4lkerOP10mo ago
yes, but now i checking documents. Before I was changing the config without knowledge
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
start: {
ssr: true,
server: {
baseURL: process.env.BASE_PATH,
preset: "static"
}
}
});
import { defineConfig } from "@solidjs/start/config";

export default defineConfig({
start: {
ssr: true,
server: {
baseURL: process.env.BASE_PATH,
preset: "static"
}
}
});
with github pages I had this configuration right now, for vercel I changed preset to "vercel". Then the deploy show 404. I Switched ssr to "false" and deploy show white screen with the previous config of github pages. it showed me the html but without the css
brenelz
brenelz10mo ago
That's really odd I think vercel worked fine for me. Maybe the base url messing it up
nksaraf
nksaraf10mo ago
can we get a small github repro so I can try the same and get back to you with a fix
w4lker
w4lkerOP10mo ago
i deleted baseUrl in config file and app.tsx. then works. Now my issue is supabase denied me. (401 error)
Revxrsal
Revxrsal10mo ago
this is my vercel config, and it's working:
import {defineConfig} from "@solidjs/start/config";

export default defineConfig({
start: {
server: {preset: "vercel"}
},

server: {
fs: {
allow: ["../.."]
}
},
});
import {defineConfig} from "@solidjs/start/config";

export default defineConfig({
start: {
server: {preset: "vercel"}
},

server: {
fs: {
allow: ["../.."]
}
},
});
w4lker
w4lkerOP10mo ago
same error
No description
Want results from more Discord servers?
Add your server