[Vue warn]: You are using the runtime-only build of Vue where the templa
2017-06-08 11:11
489 查看
[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.(found in )
上述报错是发生在使用vue框架时,单纯的向Vue中绑定一个template,如下:
下面看大神的解答:
****************************************************************************************************************************************************************************
这是什么意思呢?
运行时构建不包含模板编译器,因此不支持 template 选项,只能用 render 选项,但即使使用运行时构建,在单文件组件中也依然可以写模板,因为单文件组件的模板会在构建时预编译为 render 函数。
上面一段是官方api中的解释。就是说,如果我们想使用template,我们不能直接在客户端使用npm install之后的vue。此时,再去看查vue模块,添加几行
resolve: {
alias: {
'vue': 'vue/dist/vue.js'
}
}
再运行,没错ok了。
作者: 外号理论汪
链接:http://www.imooc.com/article/17868
来源:慕课网
本文原创发布于慕课网 ,转载请注明出处,谢谢合作!
上述报错是发生在使用vue框架时,单纯的向Vue中绑定一个template,如下:
new Vue({ el: '#app', template:"<div>wret</div>" // router, // render: h => h(App) })
下面看大神的解答:
****************************************************************************************************************************************************************************
这是什么意思呢?
运行时构建不包含模板编译器,因此不支持 template 选项,只能用 render 选项,但即使使用运行时构建,在单文件组件中也依然可以写模板,因为单文件组件的模板会在构建时预编译为 render 函数。
上面一段是官方api中的解释。就是说,如果我们想使用template,我们不能直接在客户端使用npm install之后的vue。此时,再去看查vue模块,添加几行
resolve: {
alias: {
'vue': 'vue/dist/vue.js'
}
}
再运行,没错ok了。
作者: 外号理论汪
链接:http://www.imooc.com/article/17868
来源:慕课网
本文原创发布于慕课网 ,转载请注明出处,谢谢合作!
相关文章推荐
- webpack打包vue2.0,[Vue warn]: You are using the runtime-only build of Vue where the template compiler
- You are using the runtime-only build of Vue where the template compiler is not available. Either pre
- Error:Failed to complete Gradle execution. Cause: The version of Gradle you are using (2.14.1) does
- 93.You are using flat files as the data source for one of your data warehousing applications. To opt
- 【MySQL笔记】解除输入的安全模式,Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Queries and reconnect.
- You are attempting to build with the incorrect version of java.
- You are using version 6.4.1 of the AdMob SDK which is non-compliant with the Google Play Ad Policy
- You are attempting to build with the incorrect version of java.
- rror Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnec
- Error:Failed to complete Gradle execution. Cause: The version of Gradle you are using (3.3) does no
- Android studio 3.0 Warning:One of the plugins you are using supports Java 8 language features. To t
- MySQL错误:Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL easonjim
- You are attempting to build with the incorrect version of java.
- Are you looking for a way to get the entire text of a word document into a RichEdit without using the Clipboard?
- You are attempting to build with the incorrect version of java
- proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy sub
- 处理MySQL更新表时ErrorCode:1175.You are using safe update mode and you tried to update a table without a WHERE that uses a KEY
- build/core/main.mk:77: You are attempting to build on a 32-bit system. Only 64-bit build environment
- You are not using the latest Platform SDK header/library
- You are attempting to build on a 32-bit system.Only 64-bit build environments are supported beyond f