S
S
s243442019-01-27 13:13:47
webpack
s24344, 2019-01-27 13:13:47

How to properly use Vue.js in a webpack build?

Hello. Can you please tell me how to properly use Vue.js in webpack assembly?
index.html

div id="vue-root">
  <h2>
    <a href="{{ url }}">Google</a>
  </h2>
</div>

index.js
import Vue from 'vue';

new Vue({
  el: '#vue-root',
  data: {
    url: 'http://google.com'
  }
})

Next error:
vue.runtime.esm.js:601 [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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-01-27
@s24344

We read the documentation more carefully.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question