- Vite SSR
- Vitest
- Jest
Vite’s server rendering leaves dependencies to Node, in
vite dev and in a built server alike. The server of a Vite-based framework, such as React Router’s framework mode, TanStack Start, Astro or Vike, throws ERR_UNKNOWN_FILE_EXTENSION for dist/styles.css as it starts.Name the package in ssr.noExternal, wherever the framework takes its Vite settings (Astro’s sit under vite in astro.config.mjs):vite.config.ts
Importing
@kanso-labs/kanso-ui/styles.css yourself does not help. An environment that cannot import CSS from JavaScript cannot load the main entry at all, whatever else it loads.
