-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[馃悶] using menu.md and having a route named menu
causes an error
#4504
Comments
Start a new pull request in StackBlitz Codeflow. |
A possible quick solution would be appending "Markdown" to the generated import statements. I'd be happy to make the changes with tests if this seems a reasonable solution. import * as Menu from "/home/hbendev/Projects/qwik-starter-kd1pse/src/routes/menu/index";
import * as MenuMarkdown from "/home/hbendev/Projects/qwik-starter-kd1pse/src/routes/menu.md"; |
My workaround for now was move the "routes/menu/" route into a grouped layout, "routes/(dummy}/menu/". |
Well, that works, but sounds very hacky, and not developer friendly. On the other hand, my proposed solution isn't perfect either. No matter what we append to variable name, this conflict can arise (even in nested routes): import * as DemoFlowerMenuMarkdown from "/home/hbendev/Projects/qwik-starter-kd1pse/src/routes/demo/flower/menu/markdown.tsx";
import * as DemoFlowerMenuMarkdown from "/home/hbendev/Projects/qwik-starter-kd1pse/src/routes/demo/flower/menu.md"; We'd have to make them all unique. But for this,
|
by appending type to the id generated from the path - except for menus and layouts, because they already contain their type based on the file names fix QwikDev#4504
by appending type to the id generated from the path - except for menus and layouts, because they already contain their type based on the file names fix #4504
Which component is affected?
Qwik Runtime
Describe the bug
If I'm using a menu.md file for creating a menu using useContext and I also have a route named
menu
then I receive the following error when trying to run withpreview
and during a build.Reproduction
https://stackblitz.com/edit/qwik-starter-kd1pse
Steps to reproduce
npm run preview
System Info
Additional Information
No response
The text was updated successfully, but these errors were encountered: