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
高洛峰2017-05-16 13:26:42
is added using Vue
开发,在编译时,需要在编译的文件首行追加// { "framework": "Vue" }
。如果使用webpack
,可以利用BannerPlugin
.
阿神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