Build uses outdated files from cache since 5.1.6 or 5.1.7 #13028
Labels
- P2: has workaround
Bug, but has workaround (priority)
feat: content layer
Related to the Content Layer feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
If a script is written (e.g. a Shiki transformer or Rehype plugin) that changes something in a content post, then the site is built, then script is changed to do something else, and the site built again. That second build seems to think that because the content file hasn't been updated, nothing has changed, and the changes aren't written to the cache.
For example, I add the following:
Then I run
npm run build
. Then I delete the lineline.properties['style'] = 'background-color: red';
. Then I build again and preview. The line backgrounds will remain red.I have tested this on StackBlitz and it's reproducible, but I don't have a Pro account and can't share the project.
What's the expected result?
I expect that
npm run build
will always output the latest version of the project. In the case above, I expect that the content files are updated to not have lines with red backgrounds ifnpm run build
is executed after that line has been removed.Link to Minimal Reproducible Example
N/A, read above
Participation
The text was updated successfully, but these errors were encountered: