Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make less and modules work together? #209

Open
baurine opened this issue Jan 8, 2020 · 1 comment
Open

How to make less and modules work together? #209

baurine opened this issue Jan 8, 2020 · 1 comment

Comments

@baurine
Copy link

baurine commented Jan 8, 2020

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
    }),
    ...
@himself65
Copy link
Collaborator

try to update rollup to 1.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants