As my understanding from the README, I just need to install the less
as the dependency and set modules: true
then I can import less file as css modules like this:
// MyComponent.tsx
import styles from "./MyComponent.less"
But I get the errror: [!] (rpt2 plugin) Error: ... semantic error TS2307 Cannot find module './MyComponent.less'
after running the rollup -c
.
I use the rollup-plugin-css version 1.6.2 and rollup version 0.62.0
My rollup.config.js:
...
plugins: [
external(),
postcss({
modules: true
}),
...
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too