We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Thanks for the example, it has been very useful. Had a question about generating a render function in a server less manner.
I have a file with simple HTML, such as:
<html> <body>Hello</body> </html>
Then I try to generate a render function via:
import { compile, VNode } from "vue"; const renderFunction = compile(fileContents); const node: VNode = renderFunction({});
And it works! However I get these warnings:
[Vue warn]: resolveComponent can only be used in render() or setup(). [Vue warn]: resolveComponent can only be used in render() or setup().
Any idea of how to get rid of them?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
This is caused by vue runtime, if we take a look at vue source code, you could read this:
function resolveAsset(...) { ... else if (__DEV__) { warn( `resolve${capitalize(type.slice(0, -1))} ` + `can only be used in render() or setup().` ) } }
when __DEV__ is true, you will get the warn, so you can change vue runtime to production mode, e.g. set process.env.NODE_ENV = "production"
__DEV__
process.env.NODE_ENV = "production"
Sorry, something went wrong.
No branches or pull requests
Hi,
Thanks for the example, it has been very useful. Had a question about generating a render function in a server less manner.
I have a file with simple HTML, such as:
Then I try to generate a render function via:
And it works! However I get these warnings:
Any idea of how to get rid of them?
Thanks a lot!
The text was updated successfully, but these errors were encountered: