I've read the readme several times now and I couldn't find a way to exclude certain file types. The specific problem I'm having is that I am importing style sheets, for example import style from "@/styles/ColorDisplay.module.scss"; I now want test the code with mocha, and the typescript compiler fails with: Cannot find module '@/styles/ColorDisplay.module.scss' or its corresponding type declarations.. I've googled and the top result seems to be a npm module called ignore-styles. With the little knowledge I have, I assume that because I'm using a path, tsconfig-pahts is resolving it before giving ignore-styles a chance (sorry if that's not the case, like I said, I'm not experienced.).
I've read the readme several times now and I couldn't find a way to exclude certain file types. The specific problem I'm having is that I am importing style sheets, for example
import style from "@/styles/ColorDisplay.module.scss";
I now want test the code with mocha, and the typescript compiler fails with:Cannot find module '@/styles/ColorDisplay.module.scss' or its corresponding type declarations.
. I've googled and the top result seems to be a npm module calledignore-styles
. With the little knowledge I have, I assume that because I'm using a path,tsconfig-pahts
is resolving it before givingignore-styles
a chance (sorry if that's not the case, like I said, I'm not experienced.).Here is what I'm trying to do in my
.mocharc.js
:I have also tried doing:
So is it possible that
tsconfig-paths
is just snatching all the imports, before other plugins have a chance to ignore it?(Again, sorry if I'm being stupid)