-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dev): path handling in dev #7180
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 4bb9dbe The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 |
- remove srcDir usage in optimizer - remove dev_path and devPath from optimizer options - don't change path of transformed files - use relative paths in transform calls - use relative path in source map - use relative path in click-to-component
doesn't seem to have any effect
This pretends that the src/ dir is the root of the project as far as the optimizer is concerned, and makes sure the click-to-component knows about it. This way the relative paths given to the optimizer are the same as before.
Hey Wout, Excerpt URL from Windows OS. docs%2Fsrc%2F%2Fsrc%2Fcomponents%2Fheader%2Fheader.tsx%3A63%3A11 |
@Shane-Donlon thanks! Looks like a problem with normalizing, hmm |
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. 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'))
|
Fixes #7135
Before merging:
pnpm docs.dev
and alt-clicking a component to open in editor should work.