【问题标题】:Meteor + Vue runtime-only buildMeteor + Vue 运行时构建
【发布时间】:2017-12-08 17:08:44
【问题描述】:

Meteor + Vue integration 与服务器端渲染一起使用时,我在客户端和服务器上都收到以下警告:

您正在使用仅运行时构建的 Vue,其中模板编译器不可用。

[Vue warn]: You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.

这是什么意思,我该如何解决?包裹做错了吗?一般来说,我关注的是this example project

【问题讨论】:

标签: javascript meteor vue.js server-side-rendering


【解决方案1】:

这是由于试图渲染一个空的 Vue 模板造成的。 Vue 错误地将其解释为模板编译器无法正常工作。在 .vue 的 home 文件中加入一些简单的代码,如下所示:

<template>
  <p>foo</p>
</template>

【讨论】:

    猜你喜欢
    • 2015-01-28
    • 2017-08-10
    • 2020-04-13
    • 2020-01-14
    • 1970-01-01
    • 1970-01-01
    • 2018-08-15
    • 2019-11-27
    • 2017-11-24
    相关资源
    最近更新 更多