Skip to content

Commit 54efcb8

Browse files
committed
fix: unexpected reload at dev when md contains frontmatter
1 parent 81eef30 commit 54efcb8

File tree

1 file changed

+2
-2
lines changed
  • packages/@vuepress/markdown-loader

1 file changed

+2
-2
lines changed

packages/@vuepress/markdown-loader/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = function (src) {
5050
const cachedData = devCache.get(file)
5151
if (cachedData && (
5252
cachedData.inferredTitle !== inferredTitle ||
53-
JSON.stringify(cachedData.frontmatter) !== JSON.stringify(frontmatter) ||
53+
JSON.stringify(cachedData.frontmatterData) !== JSON.stringify(frontmatter.data) ||
5454
headersChanged(cachedData.headers, headers)
5555
)) {
5656
// frontmatter changed... need to do a full reload
@@ -59,7 +59,7 @@ module.exports = function (src) {
5959

6060
devCache.set(file, {
6161
headers,
62-
frontmatter,
62+
frontmatterData: frontmatter.data,
6363
inferredTitle
6464
})
6565
}

0 commit comments

Comments
 (0)