Re:WMR – Tiny all-in-one development tool for modern web apps
by developit on Thursday December 03, 2020 @04:40PM
(#25295506)
You need to change the HTML to point to the tsx file too:
<script type="module" src="./index.tsx"></script>
There are ambient TS definitions for CSS Modules, it just had a bug in 1.0.0 - fix is merged and will be released shortly.
Re:WMR – Tiny all-in-one development tool for modern web apps
by mssundaram on Thursday December 03, 2020 @04:43PM
(#25295552)
Thank you!
Edit: It does work for e.g. pages/about/index.js to rename to index.tsx - so maybe it's just the main index that won't work as Typescript?
Also it looks like there is no default definition provided for imported CSS modules - the import resolves to a string so "styles.about" doesn't compile