Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix external module detection on Windows #89

Merged
merged 1 commit into from
May 8, 2019
Merged

fix external module detection on Windows #89

merged 1 commit into from
May 8, 2019

Conversation

a-type
Copy link
Contributor

@a-type a-type commented May 8, 2019

Fixes #87

Absolute path detection was not working for Windows users. I updated the util to use Node's built-in function.

I also created a regression test in the testing suite to ensure that exports defined in other files are correctly included in the final library build.

@a-type
Copy link
Contributor Author

a-type commented May 8, 2019

Another problem that's related: the default tsconfig.json adds src/* to the paths, but doing so means that TS will resolve auto-imported modules relative to src (so if I auto-imported something from src/utils.ts, it would come in as import { foo } from 'utils'. This causes these modules to also be marked as external. That's likely to confuse people. Either the default tsconfig shouldn't use the absolute resolution in src, or the external check will need to be made a bit smarter. I consider that outside the scope of this particular issue (Windows support out of the box).

@jaredpalmer
Copy link
Owner

Nice.

@jaredpalmer jaredpalmer merged commit 78bb42f into jaredpalmer:master May 8, 2019
@a-type a-type deleted the fix-windows-external-modules branch May 8, 2019 21:13
@agilgur5
Copy link
Collaborator

@allcontributors please add @a-type for code, test, bug

@allcontributors
Copy link
Contributor

@agilgur5

I've put up a pull request to add @a-type! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative imports are treated as external on Windows
4 participants