Fix live content collections when project location space directory#13982
Fix live content collections when project location space directory#13982sgalcheung wants to merge 7 commits intowithastro:mainfrom
Conversation
|
|
This case is because the Vite eval() lost the original We use In this case, we will hardly fetch it, because it cannot be found in the stack information. I still haven't found a better method to resolve it. Should we replace |
|
@sgalcheung can you give an example of a path that causes it to fail? |
I added a test file: |
|
Thanks for looking into this. I had a PR with a fix for a separate but related issue, and I've added a fix for this into that (basically we'll no longer throw this error when we can't find the filename) |
|
You have a PR to resolve the project location with the space path? |
|
Yes, the fix is to be forgiving if it can't get the filename, and not throw an error. It might mean we have some false negatives, but it will give an overall better result. See #13988 |
|
I ran the test locally and seems to work, so I'm going to close this PR. Thanks! |
Changes
Testing
Add live content loaders with a space fixture
https://github.com/sgalcheung/astro/blob/83ec3c9664bd653bf3400f1226b7b9d7c19de6b0/packages/astro/test/live-loaders(with%20space).test.js#L13
Docs