-
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
Synchronously create files #8
Comments
Hmm, never mind, even synchronously creating files doesn't seem to be fixing my issue (I hardcoded the output and tried it out.) Would be nice to have the option though! |
That is indeed surprising. The example invokes typed-css-modules immediately followed by tsc. That will often fail due to missing or outdated d.ts files, won't it ? |
@AlexGalays that's correct. What's happening is:
The next time webpack runs, it reads the filesystem again, and this time the .d.ts files are included. This way tsc compiles correctly without errors. For more discussion, see this issue: #2. Closing for now because synchronous creation isn't that useful unless we can update the webpack cache before tsc uses it. |
@athyuttamre Thanks for the loader lead. |
is there no way to create the .d.ts files around the same time the JS bundle is rewritten ? As it stands, my app is recompiled twice for every change so I reverted to untyped css modules for now. |
That's our experience too. There is an emitFile API in the Webpack loader docs, but I never got it to work. Perhaps someone with more experience could look into it. |
@Quramy Is this fixed by any chance? css modules are the last untyped bit in our whole app. |
Is there a way to synchronously create the .d.ts files? I'm using this module with webpack and need to generate these files before I run the TypeScript compiler.
The text was updated successfully, but these errors were encountered: