Skip to content

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

Description

@s-KaiNet

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions