PrimaryButton is white with white text

Just downloaded the newest vue-vite template, no changes, and got this:

You may see that the rightmost button is white. I think that’s the PrimaryButton There’s a similar white button inside the Sign In page. Just cleared the nuget cache, updated Node v18, did a fresh install again. Looks the same with Vite or build:local (served via SS).

ok tailwind just needed to scan for *.mjs files as done in this commit:

I’ve also upgraded to the latest dependencies in vue-vite and upgraded it to use @servicestack/vue so you can use AutoQueryGrid as seen in Bookings.vue:

1 Like

I can confirm it works now.

A small thing, mostly for others:

I’ve noted that npm run dev, which runs Vite, sometimes hosts at http://127.0.0.1:5173 instead of http://localhost:5173. They are the same of course, but:

When that happens, the CORS whitelist in Configure.AppHost.cs needs to add http://127.0.0.1 to it (worked for me at least). Or else you get CORS error (at least in Chrome I did).

It’s a small thing, and one can always turn on Vite’s proxy in vite.config.ts by setting USE_DEV_PROXY = true. Perhaps it’s just me, but I got hung up on “why is there a CORS whitelist, and the API is accessed on full URL instead of relative (so no proxy), it’s probably meant to work – why doesn’t it” – it’s nice if every detail works 100% out of the box.

One more thing: The .NET hosted version doesn’t work now (e.g. the localhost:5001 one):

Plain x new vue-vite
then npm run build:local
and finally dotnet watch.

Request URL is now:
https://$deploy_api/api/Hello?name=Vue.js1234

I saw that Vite was upgraded to v4 now, so it’s probably related to this: https://vitejs.dev/guide/migration.html#production-builds-by-default

so these don’t do what they’re supposed to:

    const buildLocal = command == 'build' && mode == 'development'
    const API_URL = isProd ? DEPLOY_API : (USE_DEV_PROXY || buildLocal ? '' : DEV_API)

thx for reporting, the http://127.0.0.1:5173 CORS + build:local issue should now be resolved in latest template.

1 Like

Works as expected. Thanks for fixing on a Sunday!

1 Like