FireBlade's avatar

Tailwind CSS not working with welcome.blade.php

Am developing an e-commerce app that picks content from another domain, so this one does not need server storage. I tried building the landing page on a Livewire page but realized that it cannot work with unauthenticated users . So am resorting to the welcome page. However, am unable to make Tailwind CSS work n the welcome page. By including

 @vite(['resources/css/app.css', 'resources/js/app.js'])
 @livewireStyles

on the page header and disabling the included default styles, am able to type in the Tailwind classes, but they have no styling effect on the page when viewed via the browser even after running

npm run dev

On the web console, I can see 2 error related to CORS requests.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:5173/@vite/client. (Reason: CORS request did not succeed). Status code: (null).

Kindly help.

0 likes
3 replies
gych's avatar

Is it working in other parts of the application ?

Snapey's avatar

I tried building the landing page on a Livewire page but realized that it cannot work with unauthenticated users

There is nothing in Livewire that cares if the user is authenticated or not. It all depends where you place the route and what middleware is applied

1 like

Please or to participate in this conversation.