Fix unresolved imports - #3186
Closed
joaoantoniocardoso wants to merge 4 commits into
Closed
Conversation
joaoantoniocardoso
requested review from
Williangalvani,
joaomariolago and
patrickelectric
March 5, 2025 16:38
Reviewer's Guide by SourceryThis pull request fixes unresolved import issues by configuring ESLint with No diagrams generated as the changes look simple and do not need a visual representation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
joaoantoniocardoso
marked this pull request as draft
March 5, 2025 16:39
There was a problem hiding this comment.
Hey @joaoantoniocardoso - I've reviewed your changes - here's some feedback:
Overall Comments:
- It's great that you've addressed the unresolved imports and configured the eslint resolver, but I'm not sure about disabling the eslint rule
import/extensions. - Consider adding a comment explaining why the autopilot import was moved to a runtime fetch.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| metadata = await fetchPX4MetadataFromBoard() | ||
| } catch (e) { | ||
| metadata = (await import('@/PX4-parameters/master/parameters.json')).parameters | ||
| const response = await fetch('/PX4-parameters/master/parameters.json'); |
Member
There was a problem hiding this comment.
It doesn't look like this path exists on the built code. In order for this to work I think you'd need to move it to /public
The hint was from the IDE showing:
Cannot find type definition file for 'webpack-env'.
The file is in the program because:
Entry point of type library 'webpack-env' specified in compilerOptionsts
…the file is not available in build time
joaoantoniocardoso
force-pushed
the
fix-unresolved-imports
branch
from
July 28, 2026 01:34
1d68510 to
465d831
Compare
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.
Solves this:

I saw that part of our config came from moving to vite, then I searched for vite projects and saw that they were using
eslint-import-resolver-vite. Then I configured it following their docs, and it worked.As a side quest, I made unresolved imports throw error in build time, and the build failed on the autopilot import part, so I moved it to a runtime fetch (@Williangalvani is this correct?).
Summary by Sourcery
Fixes unresolved imports by configuring eslint to work with vite aliases. Additionally, moves the autopilot import to a runtime fetch to prevent build errors.