Question
Can't import CSS defined in packages/ui
I've defined a CSS export in the packages.json
of packages/ui
:
{
"name": "@repo/ui",
"version": "0.0.0",
"private": true,
"exports": {
"./constants": "./src/constants/index.ts",
"./types": "./src/types.ts",
"./css/*": "./src/css/*.css"
}
}
When I try to import it in my global layout.tsx
:
import './globals.css';
// import '../../../packages/ui/src/css/themes.css'; This works!
import '@repo/ui/css/themes.css';
But I get this error:
Module not found: Can't resolve '@repo/ui/css/themes.css'
What could be the issue?
Also posted here.
2 57
2