We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Apparently, the plugin is not able to resolve the types for files that are relative to some path declaration on the typescript configuration.
My tsconfig.json:
tsconfig.json
{ "compilerOptions": { "baseUrl": ".", "paths": { "~": ["./src/index.tsx"], "~/*": ["./src/*"] }, "sourceMap": true, "target": "esnext", "moduleResolution": "node", "noEmit": true, "strict": true, "isolatedModules": false, "esModuleInterop": true, "declaration": false, "resolveJsonModule": true, "experimentalDecorators": true, "lib": [ "dom", "esnext" ], "plugins": [ { "name": "typescript-styled-plugin", "tags": [ "css" ] }, { "name": "typescript-plugin-css-modules", "options": { "customMatcher": "\\.(sc|c)ss$", "camelCase": "only" } } ], "typeRoots": [ "./node_modules/@types", "./@types" ] }, "include": [ "src", "webpack" ] }
In my TS file if I import a style by an absolute path, everything works fine, but if the file path is relative to the ~ it simply doesn't work
~
import globalStyle from '~/styles/style.scss' // Doesn't work at all import globalStyle2 from '../../styles/style.scss' // Works just fine
The text was updated successfully, but these errors were encountered:
Thanks for raising this, and for the detailed reproduction instructions.
This is related to #24, and I'm working on it right now. Hopefully I'll release a fix today.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Apparently, the plugin is not able to resolve the types for files that are relative to some path declaration on the typescript configuration.
My
tsconfig.json
:In my TS file if I import a style by an absolute path, everything works fine, but if the file path is relative to the
~
it simply doesn't workThe text was updated successfully, but these errors were encountered: