Home  >  Q&A  >  body text

android - weex 项目createInstanceReferenceError: Vue is not defined

In the process of using the weex project, use weex compile to convert the ve file into a js file and put it into the andrid project assets for use. CreateInstanceReferenceError: Vue is not defined

曾经蜡笔没有小新曾经蜡笔没有小新2730 days ago915

reply all(2)I'll reply

  • 高洛峰

    高洛峰2017-05-16 13:26:42

    is added using Vue开发,在编译时,需要在编译的文件首行追加// { "framework": "Vue" }。如果使用webpack,可以利用BannerPlugin.

    reply
    0
  • 阿神

    阿神2017-05-16 13:26:42

    First, let’s answer how this problem arises. Use weex init project, then use weex compile to compile the code, convert it into a js file, and then put it into the android assets. The above problem occurs.
    Let’s talk about how to solve it. Use weexpack create project, and then use weexpack build android. The file with the problem written under src will be created, and the project will be automatically compiled and placed in android, so weex is not needed, just use weexpack

    reply
    0
  • Cancelreply