Handle file renames properly for Vue components and routes files #278
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.
When renaming Vue components, the compiler gets confused because it sees a file with the same source hash and thinks it should be the same, even though it isn't. To reproduce this bug:
Notes.vue
toFoo.vue
and adjust the import inroutes.js
.These changes fix the error and allows the new file to be referenced properly, and thus fixes #258. Hope to see it merged in soon!
Comments:
caching-compiler
, specifically how Meteor implemented their Coffeescript compiler, to make these changes. Relevant files are the following:cache.dependencyManager.lastChangeTime
is doing in the code; as far as I can tell it was added for the ability to watch imports ( commit ). It seems, however, that this is whatmulti-file-caching-compiler
was built for. Maybe revisit this part instead of rolling your own? It's not clear to me that it is necessary..routes.js
files before in the past as well so added paths there too. Since routes files are not imported by other files it shouldn't cause problems if the contents haven't changed, but it can't hurt.