title: Failed to mount component on new laravel 5.5 project
body: <p>me and a colleague have been having problems in new and old laravel projects when it comes to using vue js because we get the following error every time in the browser console</p>
  
  <pre><code>&gt;`[Vue warn]: Failed to mount component: template or render function not defined.
  found in
  ---&gt; &lt;Example&gt;
         &lt;Root&gt;
  warn @ app.js:32173
  mountComponent @ app.js:34241
  Vue$3.$mount @ app.js:39678
  Vue$3.$mount @ app.js:41868
  init @ app.js:35260
  createComponent @ app.js:36909
  createElm @ app.js:36852
  createChildren @ app.js:36980
  createElm @ app.js:36885
  patch @ app.js:37394
  Vue._update @ app.js:34147
  updateComponent @ app.js:34271
  get @ app.js:34614
  Watcher @ app.js:34603
  mountComponent @ app.js:34275
  Vue$3.$mount @ app.js:39678
  Vue$3.$mount @ app.js:41868
  Vue._init @ app.js:36000
  Vue$3 @ app.js:36085
  (anonymous) @ app.js:802
  __webpack_require__ @ app.js:20
  (anonymous) @ app.js:775
  __webpack_require__ @ app.js:20
  (anonymous) @ app.js:63
  (anonymous) @ app.js:66`
  </code></pre>
  
  <p>This happens even in new laravel projects using the default Example.vue</p>
  
  <p>My current code is the following</p>
  
  <p>Example.vue</p>
  
  <pre><code>&lt;template&gt;
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-md-8 col-md-offset-2"&gt;
                  &lt;div class="panel panel-default"&gt;
                      &lt;div class="panel-heading"&gt;Example Component&lt;/div&gt;
  
                      &lt;div class="panel-body"&gt;
                          I'm an example component!
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/template&gt;
  
  &lt;script&gt;
      export default {
          mounted() {
              console.log('Component mounted.')
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>assets/js/app.js</p>
  
  <pre><code>/**
   * First we will load all of this project's JavaScript dependencies which
   * includes Vue and other libraries. It is a great starting point when
   * building robust, powerful web applications using Vue and Laravel.
   */
  
  require('./bootstrap');
  
  window.Vue = require('vue');
  
  /**
   * Next, we will create a fresh Vue application instance and attach it to
   * the page. Then, you may begin adding components to this application
   * or customize the JavaScript scaffolding to fit your unique needs.
   */
  
  Vue.component('example', require('./components/Example.vue'));
  
  const app = new Vue({
      el: '#app'
  });
  </code></pre>
  
  <p>assets/js/bootstrap.js</p>
  
  <pre><code>window._ = require('lodash');
  
  /**
   * We'll load jQuery and the Bootstrap jQuery plugin which provides support
   * for JavaScript based Bootstrap features such as modals and tabs. This
   * code may be modified to fit the specific needs of your application.
   */
  
  try {
      window.$ = window.jQuery = require('jquery');
  
      require('bootstrap-sass');
  } catch (e) {}
  
  /**
   * We'll load the axios HTTP library which allows us to easily issue requests
   * to our Laravel back-end. This library automatically handles sending the
   * CSRF token as a header based on the value of the "XSRF" token cookie.
   */
  
  window.axios = require('axios');
  
  window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
  
  /**
   * Next we will register the CSRF Token as a common header with Axios so that
   * all outgoing HTTP requests automatically have it attached. This is just
   * a simple convenience so we don't have to attach every token manually.
   */
  
  let token = document.head.querySelector('meta[name="csrf-token"]');
  
  if (token) {
      window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
  } else {
      console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
  }
  
  /**
   * Echo exposes an expressive API for subscribing to channels and listening
   * for events that are broadcast by Laravel. Echo and event broadcasting
   * allows your team to easily build robust real-time web applications.
   */
  
  // import Echo from 'laravel-echo'
  
  // window.Pusher = require('pusher-js');
  
  // window.Echo = new Echo({
  //     broadcaster: 'pusher',
  //     key: 'your-pusher-key'
  // });
  </code></pre>
  
  <p>welcome.blade.php</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="{{ app()-&gt;getLocale() }}"&gt;
      &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
          &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
          &lt;meta name="csrf-token" value="{{csrf_token()}}"&gt;
          &lt;title&gt;Laravel&lt;/title&gt;
  
          &lt;!-- Fonts --&gt;
          &lt;link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"&gt;
          &lt;link rel="stylesheet" type="text/css" href="/css/app.css"&gt;
          &lt;!-- Styles --&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
  
          &lt;div id="app"&gt;
              &lt;example&gt;&lt;/example&gt;
          &lt;/div&gt;
          &lt;script type="text/javascript" src="/js/app.js"&gt;&lt;/script&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>webpack.mix.js</p>
  
  <pre><code>let mix = require('laravel-mix');
  
  /*
   |--------------------------------------------------------------------------
   | Mix Asset Management
   |--------------------------------------------------------------------------
   |
   | Mix provides a clean, fluent API for defining some Webpack build steps
   | for your Laravel application. By default, we are compiling the Sass
   | file for the application as well as bundling up all the JS files.
   |
   */
  
  mix.js('resources/assets/js/app.js', 'public/js')
     .sass('resources/assets/sass/app.scss', 'public/css');
  </code></pre>
  
  <p>package.json</p>
  
  <pre><code>{
    "private": true,
    "scripts": {
      "dev": "npm run development",
      "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
      "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
      "watch-poll": "npm run watch -- --watch-poll",
      "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
      "prod": "npm run production",
      "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
      "axios": "^0.16.2",
      "bootstrap-sass": "^3.3.7",
      "cross-env": "^5.0.1",
      "jquery": "^3.1.1",
      "laravel-mix": "^1.0",
      "lodash": "^4.17.4",
      "vue": "^2.1.10"
    },
    "dependencies": {
      "cross-env": "^5.0.5",
      "vee-validate": "^2.0.0-rc.17"
    }
  }
  </code></pre>