fix(dev): path handling in dev
Fixes #7135
Before merging:
- [ ] test on windows, I can't do it. Just running
pnpm docs.devand alt-clicking a component to open in editor should work.
🦋 Changeset detected
Latest commit: 4bb9dbea694770ff308f8c5c2e7a02e1e78544f6
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| @builder.io/qwik | Patch |
| eslint-plugin-qwik | Patch |
| @builder.io/qwik-city | Patch |
| create-qwik | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hey Wout, Just came across this PR this morning.
Excerpt URL from Windows OS.
There's an extra src (%2Fsrc%2F) in here which is causing it to fail.
If I remote the extra src it works fine, and opens in VSCode as expected.
docs%2Fsrc%2F%2Fsrc%2Fcomponents%2Fheader%2Fheader.tsx%3A63%3A11
@Shane-Donlon thanks! Looks like a problem with normalizing, hmm
Hey Wout, a little bit of digging around. Seems the problem was with string concatenation on the fetch request.
Possible edit:
Works fine on Windows (full disclosure haven't tested on Linux but can do)
Hmm ok I'll take a look. I'm not really liking that workaround, it's complex and we don't know where else things are failing
Hmm ok I'll take a look. I'm not really liking that workaround, it's complex and we don't know where else things are failing
Yeah I get that. Although the last bit of digging around.
If I change that line to the below it also works fine too (without having to do the string manipulation above)
END_SSR_SCRIPT(opts, opts.rootDir ? opts.rootDir : path.join(opts.rootDir, 'src'))
opts.srcDir included the "src" whereas opts.rootDir has the "src" omitted and works fine.
Regardless just let me know whenever things are ready for testing.
#7785 is fixing it. I close this one. Thanks for your commitment.