Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

controlling css order in vite dev server

$
0
0

I have a webpage, that loads a script from a vite dev server.

so at the end of body I have this tag

<script type="module" src="https://localhost:5173/index.ts"></script>

In general this works fine, and when I build and bundle everything it works perfectly.

However when running it as a dev server, vite throws all css tags into head.And it adds a lot of them (one per import I guess).

of course it should add it to head, but my head (before vite has loaded) looks like this

<head>   ...<title>...</title><link rel="stylesheet" href="/static/supplier.css"></head>

and vite adds its' style after it, which is an issue, since I want the supplier.css to have priority.

so is there any way to configure vite to add its' style tags at the beginning of the head tag, or at some other convenient place?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>