Closed adaliszk closed 1 year ago
Start a new pull request in StackBlitz Codeflow.
Hi @adaliszk qwikifier 👋 🙏 Is your use-case similar to this one? https://github.com/BuilderIO/qwik/issues/1885#issuecomment-1419686801
Thanks for the tip @zanettin!
Unfortunately, it looks like the issue is something else. I have updated the stackblitz link.
It seems to me that the compiler never gets to the state where it would have any parsing issues, it just does not find the src
path as it does not exist, but it should have been overwritten with srcDir
.
Hi @adaliszk
I need some more time to get into this. Imo we're loosing the srcDir
here: https://github.com/BuilderIO/qwik/blob/main/packages/qwik/src/optimizer/src/plugins/vite.ts#L114-L126.
But after fixing that, i get another error from qwik-city which still tries to resolve the routes from src
🤷
Yeah, I had run into that when I wanted to move the routes somewhere else. Somewhere it is more-less hardwired or missed in both of the plugins.
(added Qwik City to the affected components)
Which component is affected?
Qwik Rollup / Qwik City / Vite plugin / Optimizer?
Describe the bug
When specifying a custom source directory, qwik city seems to find the routes, but qwik vite fails. I am setting the paths based on the configuration options:
Alongside the tsconfig:
Exact error thrown:
Reproduction
https://stackblitz.com/edit/qwik-custom-srcdir?file=vite.config.ts
Steps to reproduce
Just configure
qwikVite
to have anything other thansrc
as itssrcDir
property.System Info
Additional Information
I want to use this feature for two primary use cases:
source
typed out to keep it aligned with the other top-level folder naming schemesroot.tsx
and I want to serve that from.storybook