fix (sucrase): resolve directory imports#390
Merged
shellscape merged 1 commit intorollup:masterfrom May 14, 2020
Merged
Conversation
shellscape
approved these changes
May 13, 2020
Collaborator
shellscape
left a comment
There was a problem hiding this comment.
LGTM. Thank you for opening this PR. I'll request review from a few others. When we have two approvals, we'll merge and put it on the release schedule.
NotWoods
approved these changes
May 13, 2020
Collaborator
larrybotha
pushed a commit
to larrybotha/plugins
that referenced
this pull request
May 20, 2020
# By Tiger Oakes (2) and others # Via GitHub * master: feat(wasm): Switch to TypeScript & named exports (rollup#363) feat(node-resolve): Add default export (rollup#361) fix (sucrase): resolve directory imports (rollup#390) docs(typescript): update readme examples (rollup#391) # Conflicts: # packages/sucrase/test/snapshots/test.js.md # packages/sucrase/test/snapshots/test.js.snap # packages/sucrase/test/test.js # pnpm-lock.yaml
LarsDenBakker
pushed a commit
to LarsDenBakker/plugins
that referenced
this pull request
Sep 12, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Rollup Plugin Name:
sucraseThis PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Attempting to import
index.tsvia its directory fails:This PR fixes this issue, while adhering to Node's strategy of first attempting to resolve the filename for a file named
my-dir.ts, and then attempting to resolvemy-dir/index.ts: https://www.typescriptlang.org/docs/handbook/module-resolution.html#how-nodejs-resolves-modules