Skip to main content
The main entry imports its own stylesheet, so the package has to reach a bundler wherever it runs. Three tools hand dependencies to Node by default, and each has a setting that sends this package through its bundler instead.
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.