Skip to content
New issue

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

Bug report: error during dev #5

Closed
marshallswain opened this issue Feb 14, 2021 · 6 comments
Closed

Bug report: error during dev #5

marshallswain opened this issue Feb 14, 2021 · 6 comments

Comments

@marshallswain
Copy link

I'm running into the following error while loading the dev server:
Screen Shot 2021-02-14 at 1 53 11 PM

The dev server actually starts without any errors, as shown in this screenshot:
Screen Shot 2021-02-14 at 1 52 32 PM

This same error is occurring with both the example folder in this repo as well as a separate project that I tried setting up manually. Here is a link to the repo: https://github.com/marshallswain/my-vitedge-project

After cloning the repo, just run npm i then npm run dev, then open the dev server in the browser.

@marshallswain
Copy link
Author

This appears to be a related issue: vuejs/core#2244.

@frandiox
Copy link
Owner

frandiox commented Feb 15, 2021

@marshallswain Hello! There are 2 problems:

  1. You need to call the plugin because it's a function since v0.6.0: vitedgePlugin() (note the parenthesis). The repo example is updated but I need to update the docs. This was causing the frontend to import entry-server instead of entry-client.
  2. The previous fix will make it work with vite@2.0.0-beta.67. However, beta.69 has changed something internally related to plugin aliases. I will update that soon.

After all of that works, you'll need to create functions/props/default.ts or the dev-server will complain.

Btw, any feedback about usage/DX is welcome!

@frandiox
Copy link
Owner

Support for Vite beta.69 is released in 0.6.1 👍

@marshallswain
Copy link
Author

Thank you! I'll try it out.

@Vitaminaq
Copy link

I found that after using JSX syntax, it will use createComponentInstance, and then it will report an error. Is there a good solution

@Vitaminaq
Copy link

image

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

No branches or pull requests

3 participants