Skip to content

No typesafety with module path aliases #227

@18anandn

Description

@18anandn

Importing scss modules using module path aliases does not give typesafety if type declarations are put in a seperate output folder.

// Works
import styles from "../styles/Home.module.scss";

// Does not work
import styles from "@/styles/Home.module.scss";

Expected Behavior

Type safety should be present when using module path aliases and type definitions are put in a seprate output folder.

Current Behavior

No typesafety when using module path aliases and type definitions are put in a seprate output folder.

Possible Solution

Maybe there is some tsconfig setting that I am missing.

Steps to Reproduce (for bugs)

Codesandbox link

Your Environment

Using Typescript Workspace version 5.4.5

  • Version used: latest as of now
  • Operating System and versions: Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions