Closed
Description
Describe the bug
I am writing a CRA-based application and just turned on "baseUrl": "src"
in the corresponding tsconfig.json
file. Hence I am importing styles as import Styles from "components/App/App.module.scss";
instead of import Styles from "./App.module.scss";
for example. This causes the plugin to not do anything and not suggest any class names since it cannot resolve the file apparently due to the unexpected nature of the absolute paths.
To Reproduce
Steps to reproduce the behavior:
- Create a fresh CRA 3.0+ application.
- Add
"baseUrl": "src"
to thecompilerOptions
oftsconfig.json
. - Install
node-sass
. - Rename the file
App.css
toApp.module.scss
. - Import as
import Styles from "App.module.scss";
. - Notice how you get no code completion since the plugin isn't able to pick up the file.
Expected behavior
No squigglies when attempting to access Styles["App"]
or Styles["App-header"]
and proper dynamic typing of Styles
.
Metadata
Metadata
Assignees
Labels
No labels