[Vuejs]-Vue – template or render function not defined

0πŸ‘

βœ…

Fixed the issue for future reference or anyone interested.

The issue was with file-loader & url-loader, I updated these two dependencies and then changed the webpack.config.js config to:

{
  test: /\.(png|jpg|gif)$/,
    use: [
      {
        loader: 'url-loader',
        options: {
          limit: 8192
        }
      }
    ]
  }

Seemed I was reading an old config on the tutorial I was following. It’s important to check the most up to date docs/help/readme.

πŸ‘€John107

0πŸ‘

Seems like the issue is in you app.js line 6. App should be in caps like so:

import Vue from β€˜vue’;
import App from β€˜./App.vue’;

const app = new Vue({
  el: "#app",
  template: '<App/>',
  components: { App }
})
πŸ‘€aks

0πŸ‘

try this:

App.js

const app = new Vue({
  el: "#app",
  render: h => h(App)
})

Leave a comment