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

fix: devtools does not show the setup section of a component for vite build --mode development #4773

Closed
wants to merge 1 commit into from

Conversation

oliverzy
Copy link
Contributor

@oliverzy oliverzy commented Aug 28, 2021

Description

Steps to reproduce
How to create a project by vite (documentation)

Run npm init vite@latest
Enter name
Select Vue (not vue-ts)
Run npm install
Devtools shows "setup" section for dev-server:

Run npm run dev (It starts dev-server for development)
Open http://localhost:3000/
Open devtools
Component "HelloWorld" contains "setup" section in devtools
Devtools doesn't show "setup" section for my build (And component displayed as `Anonymous Component"):

Replace vite build by vite build --mode development inside package.json
Run npm run build. "Dist" folder will be created
Serve the folder using instrument what you prefer. (npm run serve doesn't work for me. I used Golang with http.FileServer for static files and http.ServeFile for index.html)
Open url of your server
Open devtools
Component "HelloWorld" has name Anonymous Component and doesn't contain "setup" section in devtools
What is expected?
Devtools shows "setup" section for my result build (not only for dev-server)

What is actually happening?
Devtools doesn't show "setup" section for my result build

Additional context

See also vuejs/devtools-v6#1544

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@oliverzy
Copy link
Contributor Author

Close this, please see #4984.

@oliverzy oliverzy closed this Sep 19, 2021
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

Successfully merging this pull request may close these issues.

2 participants