title: Rollup bundles correctly but Vue is undefined
body: <p>I'm using rollup to bundle with vue and typescript. I'm getting the following errors:</p>
  
  <pre><code>Uncaught TypeError: Cannot set property 'Vue' of undefined
  Uncaught ReferenceError: Vue is not defined
  </code></pre>
  
  <p>I understand this has something to do with Vue not loading correctly. I do have Vue above my script file. So I'm not sure why this is happening. Any ideas?</p>
  
  <p>Here's my files:</p>
  
  <p>// index.html <br></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;meta name="viewport" content="width=device-width" /&gt;
    &lt;title&gt;View&lt;/title&gt;
    &lt;link href="~/vuecss/styles.min.css" rel="stylesheet"&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id="app"&gt;&lt;/div&gt;
    &lt;script src="~/vuejs/vendors.min.js"&gt;&lt;/script&gt;
    &lt;script src="~/vuejs/app.min.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>// app.ts <br></p>
  
  <pre><code>import Vue from "vue";
  import HelloComponent from "./hello/hello.vue";
  
  new Vue({
    el: "#app",
    components: {
      HelloComponent
    }
  });
  </code></pre>
  
  <p>// hello.vue</p>
  
  <pre><code>&lt;template&gt;
    &lt;div&gt;
      &lt;input v-model="name" type="text"&gt;
      &lt;div&gt;{{name}}&lt;/div&gt;
    &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script lang="ts"&gt;
    import Vue from "vue";
  
    export default Vue.extend({
      data: { name: "World" }
    });
  &lt;/script&gt;
  
  &lt;style lang="scss" scoped&gt;
    body {
      background: #303030;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      font-weight: 300;
      color: #fff;
      line-height: 1.5;
      -webkit-font-smoothing: antialiased;
    }
  &lt;/style&gt;
  </code></pre>
  
  <p>//rollup.config.vendors.js (bundles vuejs)</p>
  
  <pre><code>export default {
    entry: 'node_modules/vue/dist/vue.min.js',
    dest: 'vuejs/vendors.min.js',
    format: 'iife'
  }
  </code></pre>
  
  <p>//rollup.config.js (bundles ts and vue scripts)</p>
  
  <pre><code>import rollupTS from 'rollup-plugin-typescript2'
  import rollupVue from 'rollup-plugin-vue'
  import rollupSCSS from 'rollup-plugin-scss'
  import rollupUglify from 'rollup-plugin-uglify'
  
  export default {
    entry: 'vuesrc/app.ts',
    dest: 'vuejs/app.min.js',
    format: 'iife',
  
    plugins: [
      rollupTS(),
      rollupVue({
        autoStyles: false,
        styleToImports: true,
        compileTemplate: true
      }),
      rollupSCSS({
        output: 'vuecss/styles.min.css',
        outputStyle: 'compressed'
      }),
      rollupUglify()
    ]
  }
  </code></pre>
  
  <p>File structure screenshot: <a href="https://www.screencast.com/t/GNZ8tvpvy" rel="nofollow noreferrer">https://www.screencast.com/t/GNZ8tvpvy</a> <br>
  Vue is working but still shows the error: <a href="https://www.screencast.com/t/6dY52k2n" rel="nofollow noreferrer">https://www.screencast.com/t/6dY52k2n</a></p>
  
  <p>EDIT: Added a CDN and got this error from view: </p>
  
  <p>[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.</p>