You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(style-dev): style css for dev with vite js module
This will fix the missing styles with vite 6 for dai-shi#1012
It works by running js from the browser to create the styles with CSR
in dev. Before we were extracting the source for plain css and passing those
from the dev server in a <style> tag, but since that breaks in vite 6,
this is an easy solution that will handle styles more consistently and without
errors.
Copy file name to clipboardexpand all lines: packages/waku/src/lib/plugins/vite-plugin-rsc-hmr.ts
+11-22
Original file line number
Diff line number
Diff line change
@@ -225,28 +225,17 @@ async function generateInitialScripts(
225
225
constscripts: HtmlTagDescriptor[]=[];
226
226
227
227
for(constresultofsources.values()){
228
-
if(result.id.endsWith('.module.css')){
229
-
// CSS modules do not support result.source (empty) since ssr-transforming them gives the css keys and client-transforming them gives the script tag for injecting them.
230
-
// Since we use the client-transformed script tag, we need to avoid FOUC by blocking render
0 commit comments