sitemapPlugin插件中 modifyTimeGetter 参数如何配置获取文件最后修改时间 #3264
-
下面是文档中的代码,请问
|
Beta Was this translation helpful? Give feedback.
Answered by
Mister-Hope
Jul 4, 2023
Replies: 3 comments
-
已解决,在 vue 项目中嵌入文档,我是这样配置的。 sitemapPlugin({
modifyTimeGetter: page => {
if (page.filePathRelative == null) {
return new Date().toISOString();
}
return statSync(resolve(__dirname, '../' + page.filePathRelative)).mtime.toISOString();
},
}), |
Beta Was this translation helpful? Give feedback.
0 replies
-
下个版本我们会提供app作为参数 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
2c2dcb9