fix(scan): set namespace when resolving to html #2174
Merged
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.
fix #2163
When the wildcard resolver used by the dependency scanner resolves an import to an HTML/Vue/Svelte file, it currently doesn't set the
'html'
namespace. Because of this, the HTML loader doesn't handle the import and it is handled by esbuild instead, which can't handle the file and throws.By the way, wasn't sure why namespacing the HTML loader was necessary in the first place, is there a reason why it was only meant to handle files resolved from the main HTML file resolver and not the wildcard one?
But tests still pass now that HTML deps resolved from the wildcard resolver are handled too, so hope this is fine :)