title: Why importing the Vue.js source works, but not the module?
body: <p>The following HTML code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
      &lt;body&gt;
          Greeting below: 
          &lt;div id="time"&gt;
              {{greetings}}
          &lt;/div&gt;
          &lt;script src='bundle.js'&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>together with the <code>entry.js</code> file</p>
  
  <pre><code>// either the import or the require work
  Vue = require('./vue.js')
  //import Vue from './vue.js'
  new Vue({
      el: "#time",
      data: {
          greetings: "hello world"
      }
  })
  </code></pre>
  
  <p>and the <code>webpack.config.js</code></p>
  
  <pre><code>module.exports = {
      entry: './entry.js',
      output: {
          filename: 'bundle.js'
      }
  }
  </code></pre>
  
  <p>works fine (<code>vue.js</code> is locally downloaded from the site or a CDN). </p>
  
  <p>I then tried to use the <code>vue</code> module installed via <code>npm install vue --save-dev</code> by changing <code>entry.js</code> to</p>
  
  <pre><code>import Vue from 'vue'
  new Vue({
      el: "#time",
      data: {
          greetings: "hello world"
      }
  })
  </code></pre>
  
  <p>This version does not work anymore: the whole <code>&lt;div&gt;</code> is not rendered (only <code>Greeting below</code> is displayed).</p>
  
  <p><strong>What should be done so that Vue.js can be used with webpack?</strong></p>
  
  <p>The Vue documentation mentions webpack a few times, but only in the context of components or production builds.</p>