[Vuejs]-Requirejs with vue.js will raise "Vue is not defined"

0๐Ÿ‘

I find the simple solution, just import vue.js before requirejs

<script type="text/javascript" src="../../node_modules/vue/dist/vue.js"></script>
<script type="text/javascript" src="../../node_modules/requirejs/require.js"></script>
<script>
  console.log(Vue)
</script>

I guess requirejs override some function that vue init need, so window.Vue is not init

Leave a comment