diff --git a/packages/@vuepress/markdown-loader/index.js b/packages/@vuepress/markdown-loader/index.js index 60c9992946..a72c7005e9 100644 --- a/packages/@vuepress/markdown-loader/index.js +++ b/packages/@vuepress/markdown-loader/index.js @@ -50,7 +50,7 @@ module.exports = function (src) { const cachedData = devCache.get(file) if (cachedData && ( cachedData.inferredTitle !== inferredTitle || - JSON.stringify(cachedData.frontmatter) !== JSON.stringify(frontmatter) || + JSON.stringify(cachedData.frontmatterData) !== JSON.stringify(frontmatter.data) || headersChanged(cachedData.headers, headers) )) { // frontmatter changed... need to do a full reload @@ -59,7 +59,7 @@ module.exports = function (src) { devCache.set(file, { headers, - frontmatter, + frontmatterData: frontmatter.data, inferredTitle }) }