After using Webpack with Vue to compile a project, when I open a page that uses a Vue component I get:
[Vue warn]: Failed to mount component: template or render function not defined.
and in place of the component Vue renders
<-- function (a, b, c, d) { return createElement(vm, a, b, c, d, true); } -->
Why does this error happen?
Note: I've created an MCVE for this problem. The exact Webpack config used is:
module.exports = {
entry: __dirname + '/display.js',
output: {
filename: 'bundle.js'
},
module: {
rules: [ { test: /\.vue$/, loader: 'vue-loader' } ]
}
}