Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

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

Closed
maple3142 opened this issue Mar 18, 2018 · 1 comment
Closed

Comments

@maple3142
Copy link

Do you want to request a feature or report a bug?
bug

What is the current behavior?
Use vue-router lazyload, but get error.

const Home = import(/* webpackChunkName: "Home" */ '@/vue/Home').then(x=>x.default)
const routes = [
	{ path: '/', component: Home }
]
Home.then(console.log) //correctly print a component

If the current behavior is a bug, please provide the steps to reproduce.
repo
Type poi and open browser, and get an error: Failed to mount component: template or render function not defined.

What is the expected behavior?
No error.

If this is a feature request, what is the motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, Poi version and Operating System.

node v9.2.1
chrome 65.0.3325.162
poi 9.6.13
Windows 10 1709
@egoist
Copy link
Owner

egoist commented Mar 18, 2018

component should not be a Promise I suppose, try () => Promise instead

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