-
Notifications
You must be signed in to change notification settings - Fork 69
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
Can this be a TypeScript plugin? #29
Comments
It's interesting 😄 For example, vue-ts-plugin allows to treat .vue files as TypeScript sources. Using the same technique, this idea might be realised. |
@mohsen1 You may like https://github.com/HerringtonDarkholme/ts-css-plugin . cc: thanks @HerringtonDarkholme ! |
The docs for Language Service Plugins suggests that this wouldn't work
So I have no idea how that vue one works. Will have a little dig around in the next few days and report my findings :) |
GraphQL Plugin is editing only as well. Follow this issue: microsoft/TypeScript#16607 |
Note that it's possible to have your own tsserver and tsc that does custom module resolution. By overloading |
I was looking for something similar and came across this: There's no git repository associated with this package and I couldn't get it to work but you could look at the package content after installing it and see the approach used seems very possible. Also, the readme instructs to install vue-ts-plugin instead of ts-css-modules. |
That was me starting to mess around with Typescript language service plugins (with the aim to create one for CSS modules). I didn't get very far though :( |
Here‘s something similar as a PostCSS plugin: https://github.com/ezavile/postcss-typescript-css |
It actually already exists "plugins": [
{
"name": "typescript-plugin-css-modules",
"options": {
"classnameTransform": "camelCase",
"customMatcher": "\\.module\\.scss$"
}
}
], |
I'm not familiar with TypeScript plugins as much as you are. You wrote one but I was wondering if this can become a TypeScript plugin that extends module resolution to CSS files?
The text was updated successfully, but these errors were encountered: