-
Notifications
You must be signed in to change notification settings - Fork 361
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
Code will not build when using CSS Modules + TypeScript #822
Comments
Your issue is with this line: https://github.com/nickrttn/microbundle-ts-css-modules/blob/232190ee2f4e9cf80c5ec60aae9d92fae70c821b/package.json#L10 The bad path breaks things. Simply correct it to Need to look into it a bit further to figure out why it breaks in this fashion, but correcting that will get things working again for you. |
Yep, that is a strange error in response to that typo. Just removing the key completely fixes it as well. I did expect not to have to add the types manually after the fix for #740 was merged, but that seems to be due to the ambient types not being included on npm? |
Yeah, I'll get that fixed. |
Just had #823 merged in, should ensure those types are accessible to end users. As for the error message, I believe that's upstream in |
Closing as the path is invalid in other environments, so this isn't a Microbundle issue. |
Summary
I'm trying to bundle a React component library. I'm using Typescript and CSS Modules. When I try to build (or watch for that matter), I receive the error:
I can reproduce this in a reduced test case: https://github.com/nickrttn/microbundle-ts-css-modules
With the types added in the test case as documented in #740 I would have expected this to build. I've also tried to add https://github.com/mrmckeb/typescript-plugin-css-modules instead, with the same results. Strangely, VS Code does pick up on both of these changes.
Expected result
yarn build
should work. I've taken the customtsconfig.json
and types from #740.Actual result
This error during building or watching:
The text was updated successfully, but these errors were encountered: