Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Failed to mount component: template or render function not defined #576

Open
schellenbergk opened this issue Apr 13, 2019 · 1 comment
Open

Comments

@schellenbergk
Copy link

schellenbergk commented Apr 13, 2019

Hello,

[Vue warn]: Failed to mount component: template or render function not defined.
found in
---> <test> at src/html/components/test.vue

I'm getting this error while trying to setup Vuejs SFC's with Blendid. Here's my task-config:

...
javascripts: {
    entry: {
      // files paths are relative to
      // javascripts.dest in path-config.json
      app: ["./app.js"]
    },
    alias: {
      vue$: "vue/dist/vue.esm.js"
    },
    loaders: [
      {
        test: /\.vue$/,
        use: [
          { loader: "vue-loader" },
          { loader: "vue-style-loader" },
          { loader: "vue-template-compiler" }
        ]
      }
    ],
    customizeWebpackConfig: function(webpackConfig, env, webpack) {
      webpackConfig.plugins.push(new VueLoaderPlugin());

      return webpackConfig;
    }
  },
...

Here's my test.vue component:

<template>
  <div>{{ teststring }}</div>
</template>
<script>
export default {
  data: function() {
    return {
      teststring: "testing"
    };
  }
};
</script>

Also when I update the .vue file Blendid does not seem to be watching it.

@schellenbergk schellenbergk changed the title vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config. Failed to mount component: template or render function not defined Apr 13, 2019
@joshuarte
Copy link

same here. Any solutions yet?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants