2 ms·
One case I ran into: using css-loader/style-loader for my css. TS doesn't understand importing css files, so that's where Babel comes in. In the end i decided
by mercer 9y ago
One case I ran into: using css-loader/style-loader for my css. TS doesn't understand importing css files, so that's where Babel comes in.
In the end i decided to stick to 'old-fashioned' SCSS with an npm script; the downsides of adding Babel to my stack weren't worth the upsides of css modules. Difficult decision to make though.
I guess what I'm saying is that while there is a use case, so far it's been worth it to just stick to TS without Babel, much as I wish it'd be different.
- ksjogo 9y agoYou could use the webpack (which you might be using already) css loader and declare the css file as any.