-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Setup SFC doesn't compile development with development flag "_file" when component is process for devtools to show setup function #6800
Comments
Hey there @sodatea , just wanted to follow-up on this issue? Thanks |
Thanks for the update. I just updated to Vite: 2.3.6 and it looks like I can now see the setup contents. However, I still see my components named as "Anonymous Component" with the 6.1.4 Devtools Version and the "Allow access to file Url's checked. |
@Xenoha Have you set // vite.config.js
export default {
define: {
__VUE_PROD_DEVTOOLS__: true
}
} |
|
I should add that I still don't have the __file property when running the Moreover, I did a test and used the regular "script" syntax with the name and setup properties. This component shows correctly in the Devtools. It seems very much '__File' referencing when using the new script setup SFC. |
See vuejs/core#5496 |
Thanks @sodatea , I'll follow that issue and see if your update fixes the issue. |
Describe the bug
Steps to reproduce
Pull the repo, or just follow the getting started steps with pnpm. While I provided the vitesse starting repo with pnpm, you could use the vite repo with yarn as well. See the below for details from both project starts paths.
On Viteese:
If you just do a build with the standard starting code, then do a "pnpm preview" you will see the devtools and your layout will be Anonymous Component and the Page will be Anonymous Component.
On Vite:
If you do a build with the standard starting code. Change the dev script to the following: '"dev": "vite build --watch --mode 'development'"
Open up your chrome devtools and note that the Vue devtools should be present as you changed the mode to "development" When reviewing the component structure of the devtools, none router based components show up as Anonymous Component
What is expected?
The component file name should be visible through the devtools component tree as well as the setup properties.
What is actually happening?
The component is showing up as "Anonymous Component" and the setup method properties are not visible for the component.
Please let me know if I should submit this issue elsewhere as as always, thank you for the support.
Reproduction
github.com/antfu/vitesse
System Info
Used Package Manager
pnpm
Logs
Validations
The text was updated successfully, but these errors were encountered: