【发布时间】:2020-05-26 08:09:00
【问题描述】:
在我的 Vuepress 项目中,我想使用 v-runtime-template。
他们的设置说明说
您必须使用带有编译器的 Vue.js 版本。这是编译动态 Vue.js 模板所必需的。为此,您可以将 vue 的 webpack 别名设置为 vue/dist/vue.common 文件。
这可以通过添加来实现
module.exports = {
runtimeCompiler: true
};
到vue.config.js,但是我不明白如何在Vuepress中配置。
我试过这个:
// .vuepress/enhanceApp.js
export default ({ Vue, options, router, siteData }) => {
Vue.config.runtimeCompiler = true
}
但它没有给出任何结果。 应该怎么配置?
【问题讨论】: