Vanliga problem
Remix
Använder ni Remix? Då behöver ni lägga till följande i er config för att låta CSS ladda korrekt.
Remix med Vite
vite.config.ts
export default defineConfig({
ssr: {
noExternal: [/^@midas-ds\/.+/]
}
})
Äldre Remix - Classic Remix Compiler
Följ detta: CSS Bundling och CSS Imports
root.tsx
import { cssBundleHref } from '@remix-run/css-bundle'
import type { LinksFunction } from '@remix-run/node'
// ...
export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: 'stylesheet', href: cssBundleHref }] : [])
// ...
]
remix.config.js
// ...
export default {
// ...
serverDependenciesToBundle: [/^@midas-ds\/.+/]
}