0

Is there any way to make TypeScript resolve modules to a different name?

For example, resolving a package named our-import-generic to our-import-react-native?

TypeScript seems to insist that the imported module's name matches exactly, which can't work with Webpack module resolution aliases, or babel-plugin-module-resolver.

I've tried paths, but TypeScript still seems to demand a matching module name, so it seems to be no help.

The error we're hitting is TS2307: Cannot find module 'our-import-generic' or its corresponding type declarations.

Slbox
  • 10,957
  • 15
  • 54
  • 106

0 Answers0