Description
Which project does this relate to?
Router
Describe the bug
When using file-based routing, the build plugin/CLI should automatically update route configuration definitions when you rename a route file or even move a route file to another directory.
This process is broken if you use backticks or template literals in the createFileRoute/createLazyFileRoute
function parameter.
For example the following route configuration will not be updated
export const Route = createFileRoute(`/about`)({
...
Even though the generator automatically inserts single quotes, the function parameter might be changed to backticks by an ESLint rule to enforce backticks since it makes it easier to add variables to strings.
'@stylistic/quotes': [`error`, `backtick`]
Your Example Website or App
https://stackblitz.com/edit/github-kop2fu1y?file=src%2Froutes%2Fabout.tsx
Steps to Reproduce the Bug or Issue
- Rename
about.tsx
totest.tsx
Expected behavior
Route config should automatically be updated with the new route.
export const Route = createFileRoute(`/test`)({
Screenshots or Videos
No response
Platform
- OS: macOS
- Browser: N/A
- Version: 1.119.0
Additional context
No response