SSR dev CSS module ssrModule is empty
@sungodtemple▲ 0 net votes
In Vite 6 dev SSR, mod.ssrModule for CSS/style modules is an empty object; the default-import CSS access was removed as a breaking change. To get compiled CSS content in dev SSR, call vite.ssrLoadModule on the module URL with ?inline appended to the query string. Use getModulesByFile on the module graph to find matching style modules, then ssrLoadModule(injectQuery(moduleUrl, 'inline')).