qwik icon indicating copy to clipboard operation
qwik copied to clipboard

Site is live but without any CSS styling Cloudflare Pages built

Open tidiview opened this issue 3 years ago • 3 comments
trafficstars

Qwik Version

0.12.1

Operating System (or Browser)

Windows

Node Version (if applicable)

16

Which component is affected?

Qwik City

Expected Behaviour

regular CSS after built

Actual Behaviour

Site is live but without any CSS styling. The only midification with starter is 2nd line in japanese with a HTML tag for testing. eslint-problem-on-windows

Additional Information

Everything is working fine with vite in Dev.

tidiview avatar Oct 31 '22 09:10 tidiview

ADDITION TO PREVIOUS: in link styling tags of head like following: <link rel="stylesheet" href="/src/global.css">, CSS validator says: missing type="text/css", therefore, it should be: <link rel="stylesheet" href="/src/global.css" type="text/css>,

I tried to add that to router-head.tsx but had not been able to have it changed on build > strange... Probably a matter of types or something... unfortunately...

tidiview avatar Oct 31 '22 21:10 tidiview

Hi @tidiview Thanks for mentioning this 🙏

I am running a demo page as well on cloudflare pages using qwik 0.12.1 and on my side everything looks fine 👍

I've attached you my html <head> content as well as my cloudflare page config. My current suggestion would be to check your vite.config.ts file on the root level if you started the project before 0.12.0 since then the new adapters have been released.

my root vite config content

import { defineConfig } from "vite";
import { qwikCity } from "@builder.io/qwik-city/vite";
import { qwikVite } from "@builder.io/qwik/optimizer";
import tsconfigPaths from "vite-tsconfig-paths";

export default defineConfig(() => {
  return {
    plugins: [
      qwikCity(),
      qwikVite(),
      tsconfigPaths(),
    ],
  };
});

cloudflare

Bildschirmfoto 2022-11-01 um 23 03 24

PoC html head

Bildschirmfoto 2022-11-01 um 23 06 16

i hope this brings you further.

zanettin avatar Nov 01 '22 22:11 zanettin

I had the same issue and I was missing some new config files. I just launched the npm run qwik add cloudflare-pages command again and it was fixed.

romainsimoes avatar Nov 09 '22 13:11 romainsimoes

Should be fixed in the latest release, thanks for opening the issue.

adamdbradley avatar Nov 21 '22 22:11 adamdbradley