css-modules-typescript-loader icon indicating copy to clipboard operation
css-modules-typescript-loader copied to clipboard

Cannot find module './Component.module.scss' and unused components

Open s-KaiNet opened this issue 4 years ago • 0 comments

If I have a component, which is not in a resulting webpack bundle, then css-modules-typescript-loader does not produce corresponding .scss.d.ts which is correct, since the .scss is not running through the webpack pipeline.

However, ts-loader anyway reports error for this file (Cannot find module './Component.module.scss') and breaks the webpack build. Is it possible to somehow exclude unused components from build?

s-KaiNet avatar May 17 '21 11:05 s-KaiNet