Nuxt如何把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.

阅读 2.9k
2 个回答

关键点在于你选择 Vue 版本的时候选择了 runtime-only,这个版本是不能编译 template,需要手写 render 函数。你应该选择 Vue 版本为 runtime-complier,它会在运行时编译。

在nuxt.config.js中的build加上以下配置即可:

image

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题