fix(host): getScriptSnapshot
must also call fileNames.add
#364
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.
Summary
Make
getScriptSnapshot
match/callsetSnapshot
. Previously, athis.fileNames.add
call was added tosetSnapshot
but notgetScriptSnapshot
, causing aCould not find source file
error.Could not find source file
when running in watch mode withrollup-plugin-vue
#271Details
fileNames
Set that was previously introduced in the fix for Error:Could not find file
when extraneous TS files in project anddeclaration: true
#95 (this line in the commit) caused a regression during watch modesetSnapshot
was updated to callthis.fileNames.add
, butgetScriptSnapshot
was notsetSnapshot
fromgetScriptSnapshot
as this code is supposed to be identicaldata
->source
for consistency and clarity (source
is a more specific name)See #271 (comment) and my other comment above it for a root cause analysis.