vue2.0支持compiler
生活随笔
收集整理的這篇文章主要介紹了
vue2.0支持compiler
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
**報錯問題:**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.
原因
vue有兩種形式的代碼 compiler(模板)模式和runtime模式(運行時),vue模塊的package.json的main字段默認為runtime模式
解決方案:在vue.config.js中添加runtimeCompiler: true來開啟Compiler支持
runtimeCompiler: true總結
以上是生活随笔為你收集整理的vue2.0支持compiler的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Proficy Historian介绍
- 下一篇: Python常用设计模式—创建型模式