Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Standard Laravel install with Vite - CSS not loading #406

Open
sitesurfer opened this issue Mar 15, 2024 · 11 comments
Open

[Bug]: Standard Laravel install with Vite - CSS not loading #406

sitesurfer opened this issue Mar 15, 2024 · 11 comments

Comments

@sitesurfer
Copy link

System architecture

Mac, Intel (x86)

PHP Version

No response

Bug description

I have tested this with a colleague and none of the assets are available when using a standard no-frills Laravel build.

We build the app in the normal way, and build also using npm run build just to be sure.

However, no css becomes available once viewing the site via Expose - whether using pro or not.
I have checked through the github issues, and raised the domain in the suggested way - but nothing shows at all.

Is this a known issue? Seems that something built for Laravel in mind would have this as a primary benefit.

Steps to reproduce

Build a normal Laravel site with Tailwind and expose, css will 404

Relevant log output

No response

@regorlladu
Copy link

Having the exact same issue, i paid for pro and atm im stuck at getting this work as described. I look forward to using this tool during my development projects

@sitesurfer
Copy link
Author

Any response on this please? I have emailed you as well, naturally paying for a pro upgrade and things not working as advertised is not ideal.

@Ssionn
Copy link

Ssionn commented Apr 25, 2024

Have you tried

npm run dev

or

npm run build

You have to run them with expose.

@prof-anderson-trindade
Copy link

Any response on this please? I have emailed you as well, naturally paying for a pro upgrade and things not working as advertised is not ideal.

@sitesurfer

Have you tried force https in AppServiceProvider?

public function boot(): void { URL::forceScheme('https'); }

@hichemnightowl
Copy link

hichemnightowl commented Jul 1, 2024

try npm run dev --host after that you can run expose

@henningd
Copy link

I tested it too. Locally all works fine. When I test it with my mobile phone, the site will be shown, but without all tailwind design. Only local css is working.

@eiiot
Copy link

eiiot commented Aug 9, 2024

+1, would like to be able to use this with my phone if possible

@yehuuu6
Copy link

yehuuu6 commented Sep 6, 2024

Did anyone actually solve this?

@regorlladu
Copy link

regorlladu commented Sep 6, 2024

Did anyone actually solve this?

This css issue is caused by having the 'npm run dev' running stop your local server, and then share with expose, it will then work.

@yehuuu6
Copy link

yehuuu6 commented Sep 6, 2024

Did anyone actually solve this?

This css issue is caused by having the 'npm run dev' running stop your local server, and then share with expose, it will then work.

The page at 'https://ncgak7qxy6.sharedwithexpose.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://ncgak7qxy6.sharedwithexpose.com/build/assets/app-Brkf_2h0.css'. This request has been blocked; the content must be served over HTTPS.

I get this error can you help me with this? The page tries to load every asset using http. images, css bundles, etc.

@yehuuu6
Copy link

yehuuu6 commented Sep 6, 2024

<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">

Adding this to meta tag fixed the issue but it is not recommended I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants