fix: cannot "go to file" when using dynamic routes on Windows
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.3k
- Forks
- 214
- Avg merge
- 13h 22m
- Merged PRs (30d)
- 18
Description
🐛 The bug
The Component Inspector on Nuxt DevTools can't open a file in the editor if using square brackets on the file name (eg: dynamic routes), which works normally on Linux.
🛠️ To reproduce
https://github.com/ojvribeiro/nuxt-devtools-issue
To reproduce is necessary to be in a Windows enviroment:
- Run the attached reproduction
- Click the "Nested Page" link to go to the nested page
- Use the component inspection tool to select the "Nested child" heading
Then see the error in the terminal:
🌈 Expected behavior
It's expected to go to file on component inspection on Windows. I'm not sure since when this bug started to happen. It worked fine some time ago.
ℹ️ Additional context
Nuxt project info: 23:57:39
- Operating System: Windows_NT
- Node Version: v20.13.1
- Nuxt Version: 3.12.4
- CLI Version: 3.11.1
- Nitro Version: -
- Package Manager: pnpm@9.4.0
- Builder: -
- User Config: devtools, compatibilityDate
- Runtime Modules: -
- Build Modules: -
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked reproduction on Windows and tracing the Component Inspector's "go to file" path after selecting the nested child heading. Focus on how square brackets in dynamic-route filenames are handled; done means the editor opens the selected file successfully on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- developer-experience, devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100