Skip to content

Commit

Permalink
revert: "fix: Try to identify unbuilt installed modules"
Browse files Browse the repository at this point in the history
This reverts commit 196fb5e.
  • Loading branch information
atdrago committed Feb 7, 2022
1 parent b06fb25 commit 4d47698
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ export default function (styleApi: IStyleAPI): IStyleItem[] {
moduleName: `${imported.moduleName}.tsx`,
};

// In some cases, the module may not be built, and might only exist as a
// file with a `.ts` extension (not `.js`). Try to handle these cases by
// searching for a `.ts` file with the same name.
const __filenameWithTs = __filename.replace(/\.js$/, '.ts');

return (
isInstalledModule(__filename)(imported) ||
isInstalledModule(__filenameWithTs)(imported) ||
isInstalledModule(__filename)(importedWithTs) ||
isInstalledModule(__filename)(importedWithTsx)
);
Expand Down

0 comments on commit 4d47698

Please sign in to comment.