title: How do I load a Vue.js application into an existing webpage via script tags?
body: <p>I would like to load a Vue.js application into an existing webpage via script tags. </p>
  
  <p>Currently after running <code>npm run build</code> inside of my Vue application, I get 7 compiled files:</p>
  
  <ol>
  <li>app.js</li>
  <li>app.js.map</li>
  <li>manifest.js</li>
  <li>manifest.js.map</li>
  <li>vendor.js</li>
  <li>vendor.js.map</li>
  <li>app.css</li>
  </ol>
  
  <p>I thought I could load those 3 js files (manifest, vendor and app - excluding the map files) as the source in script tags on my separate webpage and the Vue application would then exist on that webpage.</p>
  
  <p>(I would also load the css file on the page but I am not worried about that currently.)</p>
  
  <p>After attempting to inject the 3 js files in script tags (as the src), I see the js files do exist on page as sources, but it does not seem the Vue application is ever 'executed' and no DOM elements from the Vue application exist on the page. </p>
  
  <p>I also loaded the vue.js (development version) js file via a script tag on the page as well.</p>
  
  <p>I am not extremely familiar with web-pack but I suspect there is something that needs to be done to execute web-pack to run the Vue application within this separate webpage since web-pack is what is used to run the Vue application locally on its own.  </p>
  
  <p>I am unsure if this is even possible but I am unable to find any resources that demonstrate what I am trying to achieve.</p>
  
  <p>Please provide any help or information that is relevant and if this is even the correct way to go about running a Vue application within a third party webpage.</p>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p>This is the js code used to insert the script tags with the src of the files:</p>
  
  <pre><code>var head = document.getElementsByTagName('head')[0];
  var js = document.createElement("script");
  js.src = "/js/app.js";
  head.appendChild(js);
  </code></pre>
  
  <p>I use this code for each of the files (app, manifest and vendor). This is all I do and the script tags exist on page with the correct sources. Under the sources tab in my Chrome debugger I see all three js files being loaded correctly.</p>