Comments (4)
Hi @StevenLangbroek, this plugin only works within IDE environments. This is a limitation of TypeScript, as plugins aren't loaded during builds.
This is unfortunate, and as soon as TypeScript does support this, we'll be sure to add whatever is needed.
You can read more about that here:
https://github.com/microsoft/TypeScript/wiki/Writing-a-Language-Service-Plugin#whats-a-language-service-plugin
On your exact issue, it's likely that your app and Storybook have Webpack loaders to handle CSS modules. For Jest, there are libraries like these that might help?
- https://www.npmjs.com/package/jest-css-modules
- https://www.npmjs.com/package/jest-css-modules-transform
It looks like you have a file that should be handling this already (/config/jest/cssTransform.js
) but maybe it isn't working?
from typescript-plugin-css-modules.
Fixed by using https://www.npmjs.com/package/jest-css-modules-transform. If you feel it's worth documenting I can add a line to README.
from typescript-plugin-css-modules.
Oh wow thanks for the thoughtful response 🙇 . Yeah that was exactly the issue. Let me know if you want me to write this into README..
from typescript-plugin-css-modules.
NP! I'll make an update in the next few days, that's a great idea - thanks ;)
And glad I could help.
from typescript-plugin-css-modules.
Related Issues (20)
- The ts type prompt is not updated after modifying the scss file HOT 1
- Plugin syntax error but typescript compiles fine HOT 2
- Allow to create configurable extensions for VSCode based on this plugin HOT 3
- How to use `typescript-plugin-css-modules` in `ts-loader` webpack ? HOT 1
- Plugin causes error in VSCode with TypeScript 5.2.2 HOT 3
- Current customMatcher does not match stylus files HOT 2
- The plugin isn't working correctly for me and I'm not sure why HOT 4
- Move to file in VSCode does not work with plugin installed HOT 1
- Is version 5 backwards compatible with weback and CRA HOT 2
- Including this plugin in WebStorm projects breaks TS type checking HOT 10
- refactoring support in vscode HOT 1
- goToDefinition doesn't work properly HOT 12
- Plugin activation failed: TypeError: Cannot set property createLanguageServiceSourceFile
- Using external importers HOT 1
- Consider making `sass` an optional peerDependency HOT 1
- Plugin crashes TypeScript ProjectService in TS 5.3.2+ HOT 1
- Does not work in VSCode and a common SvelteKit project. HOT 2
- `@value` is missing from imported type HOT 5
- goToDefination not working in WebStorm HOT 5
- Add support for Node.js Subpath Imports
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typescript-plugin-css-modules.