Skip to content

fix(config): resolve implicit deps as absolute path#10254

Merged
antfu merged 9 commits intomainfrom
fix/load-config-try
Oct 3, 2022
Merged

fix(config): resolve implicit deps as absolute path#10254
antfu merged 9 commits intomainfrom
fix/load-config-try

Conversation

@antfu
Copy link
Member

@antfu antfu commented Sep 27, 2022

Description

fix #9202, revert #9140

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.

@antfu antfu marked this pull request as ready for review September 29, 2022 09:02
@antfu antfu requested a review from bluwy September 29, 2022 09:11
@Akryum
Copy link
Contributor

Akryum commented Oct 3, 2022

I need this to fix vite-node in Histoire 🙏

if (id[0] !== '.' && !isAbsolute(id)) {
const idFsPath = tryNodeResolve(id, importer, options, false)?.id
const idPath =
isESM && idFsPath ? pathToFileURL(idFsPath).href : idFsPath
Copy link
Member

Choose a reason for hiding this comment

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

@antfu could Windows be complaining because idFsPath is now normalized? In the current code it isn't. I don't think this should affect though.

@antfu
Copy link
Member Author

antfu commented Oct 3, 2022

Nice fix @bluwy!

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.

Vite >=3.0.1 fails to resolve projects in monorepo

4 participants

Comments