Skip to content

Support for tsconfig paths #150

@odensc

Description

@odensc

In my tsconfig.json I use the paths option:

"compilerOptions": {
  [...]

  "paths": {
    "@*": ["./src/*"]
  },
}

Which allows me to import files as such:

import validateToken from "@auth/jwt"; // => <root>/src/auth/jwt.ts

However ncc's module resolution is incompatible with this feature, giving the following error:

ncc: Module directory "<dir>" attempted to require "@auth/jwt" but could not be resolved, assuming external.

Something like tsconfig-paths-webpack-plugin could be used to support this configuration.

I could submit a PR for this if there are no objections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions