Skip to content

Report error with VS Code #126

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

Closed
lqh-1997 opened this issue May 21, 2021 · 1 comment
Closed

Report error with VS Code #126

lqh-1997 opened this issue May 21, 2021 · 1 comment

Comments

@lqh-1997
Copy link

Describe the bug
Same as issue #113 , but I already added the following config in tsconfig.json
image
If I change scss path to relative path, the VScode will work as expected

To Reproduce
https://github.com/lqh-1997/-typescript-plugin-css-modules-issue

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Error type: has no property 'test'
image
image

Desktop (please complete the following information):

  • OS: window10
  • Browser chrome
  • Version 90

Additional context
Add any other context about the problem here.

@mrmckeb
Copy link
Owner

mrmckeb commented May 29, 2021

Hi @lqh-1997, thanks for raising this.

It looks like this is just a configuration issue - you need to wrap "rendererOptions" in an "options" object.
See: https://github.com/mrmckeb/typescript-plugin-css-modules#options

It should look like this when fixed :)

    "plugins": [
      {
        "name": "typescript-plugin-css-modules",
        "options": {
          "rendererOptions": {
            "sass": {
              "includePaths": ["src/assets/scss"]
            }
          }
        }
      }
    ]

Please let me know if you have any more issues!

@mrmckeb mrmckeb closed this as completed May 29, 2021
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