Closed bhabgs closed 3 years ago
参考这个 https://github.com/vuejs/vue-next/issues/3298#issuecomment-785687683
传入ssr 自定义指令配置试下
// docs\.vitepress\config.js
vueOptions: {
template: {
ssr: true,
compilerOptions: {
directiveTransforms: {
test: () => {
return {
props: [],
needRuntime: true,
};
},
},
},
},
},
感谢您的分享,不知道您的解决方案是否能生效,我通过查看issuse 找到了 vitepress 相关布丁。 https://github.com/antfu/vite-ssg/issues/29
vitepress 里使用 vue的自定义指令后,会提示相关错误。
custom directive is missing corresponding SSR transform and will be ignored.