2

I am trying to learn how vue works without any other libraries, unless those are a necessity. Is there a way to create a simple vue js app (the most barebones) without web pack or vue-cli? Since those packages are not yet clear to me.

So far though I can embed it in HTML; however, Node does not run HTML files only JavaScript files.

<html>
  <head>

  </head>
  <body>

    <div id="container">
      <input type="text" id="container" placeholder="enter text" v-model="value">
      <p>{{ value }}</p>
    </div>


    <script>
        var Vue = require('vue');


      new Vue({
        el: '#container',
        data: {
          value: '',
        },
      });

    </script>

  </body>
</html>
1
  • I think you know the way but dont want to walk . please learn about webpack and vue-cli Commented Dec 26, 2018 at 4:26

1 Answer 1

3

Have a look at: https://v2.vuejs.org/v2/guide/installation.html

You just need to have vue.js in script only.

For example: add it to your head tag <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>

If you do not want to use CDNs download the vue.js and put it in you web app.

There is a good explanation at https://v2.vuejs.org/v2/guide/installation.html#Explanation-of-Different-Builds which may help you more.

Also have a look at https://v2.vuejs.org/v2/examples/.

Sign up to request clarification or add additional context in comments.

1 Comment

Agreed. If you really want to do things step-by-step, you should first learn just Vue.js (clientside), and just Node+Express (serverside).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.