feat: support absoluteJitiPath for stub mode#542
Merged
Conversation
6 tasks
Member
|
Can we please have it behind a flag first? |
Contributor
Author
|
@pi0 |
pi0
reviewed
Jul 23, 2025
pi0
reviewed
Jul 23, 2025
pi0
reviewed
Jul 23, 2025
pi0
reviewed
Jul 23, 2025
jiti import path in stubabsoluteJitiPath for stub mode
1 task
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.
Related
When a stubbed build is being imported using jiti (and if this import throws an error), jiti will attempt to import it again during which the relative jiti import will fail, hiding the underlying error with a different error:
Cannot find module '(incorrect_path_to_jiti_here)' imported from (path_to_jiti_here).Here's a minimal reproduction of the issue https://stackblitz.com/edit/github-haxspghd?file=build.config.mjs
I'm not sure if there are drawbacks to using an absolute path over a relative path, but since the generated
jiti.import(resolvedEntry)also uses an absolute path I figure this shouldn't be an issue.