I would like to dynamically import CSS from an NPM package in an Astro layout:
---
const { variant } = Astro.props;
import(`@pkg/lib/css/${variant}.css`);
---
But this gives me an error:
Unknown file extension ".css"
Is there a way to achieve this?