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

Handle imports from dot directories #3739

Merged
merged 7 commits into from Jul 23, 2021
Merged

Handle imports from dot directories #3739

merged 7 commits into from Jul 23, 2021

Conversation

hpx7
Copy link
Contributor

@hpx7 hpx7 commented Jun 10, 2021

Description

Fixes #2905

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@Shinigami92 Shinigami92 added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Jun 10, 2021
@Shinigami92
Copy link
Member

Is there already a specific test that covers this change? Otherwise, could you add a test that fails without the change?

Shinigami92
Shinigami92 previously approved these changes Jun 10, 2021
nihalgonsalves
nihalgonsalves previously approved these changes Jun 11, 2021
@hpx7 hpx7 dismissed stale reviews from nihalgonsalves and Shinigami92 via 0770866 June 16, 2021 04:29
Co-authored-by: patak <matias.capeletto@gmail.com>
patak-dev
patak-dev previously approved these changes Jul 19, 2021
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is ok to merge this PR as is, but I see several other places in the code where path.startsWith('.') is used. @hpx7 you may end up hitting other issues later for these paths. After this PR, maybe we could create a helper for this check and rework all the other conditions.

@hpx7
Copy link
Contributor Author

hpx7 commented Jul 19, 2021

@patak-js with this change alone I am able to get my use cases working. Thanks!

@hpx7
Copy link
Contributor Author

hpx7 commented Jul 20, 2021

@patak-js @Shinigami92 are you able to merge this?

@Shinigami92
Copy link
Member

question: Did it previously match ../? 👀

@patak-dev patak-dev dismissed their stale review July 20, 2021 06:44

See shinigami comment

patak-dev
patak-dev previously approved these changes Jul 20, 2021
Copy link
Member

@patak-dev patak-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nvm

@hpx7
Copy link
Contributor Author

hpx7 commented Jul 23, 2021

question: Did it previously match ../? 👀

@Shinigami92 not sure if it would cause issues because ./../ is still valid but I added an explicit check for it anyway. Please let me know if this looks acceptable

@hpx7
Copy link
Contributor Author

hpx7 commented Jul 23, 2021

Looks like a test flake, but I'm not sure

@Shinigami92
Copy link
Member

I think you need to do a rebase.
We had some little problems in the main branch for a short time, sorry about that.

@hpx7
Copy link
Contributor Author

hpx7 commented Jul 23, 2021

Good to merge now?

@patak-dev patak-dev merged commit f4f0100 into vitejs:main Jul 23, 2021
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Nov 8, 2021
Co-authored-by: patak <matias.capeletto@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Regression] Prebundling fails with dot directories
5 participants