Skip to content
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(vite): fix 4964(Windows drive letter inconsistency) #4985

Merged
merged 5 commits into from
Sep 20, 2021

Conversation

CGQAQ
Copy link
Contributor

@CGQAQ CGQAQ commented Sep 19, 2021

Signed-off-by: CGQAQ m.jason.liu@outlook.com

Description

fixed #4964
fixed #4912

This is what main branch code will be like, mixup uppercase and lowercase drive letters
image
image

Now it will works perfectly!
image

What is the purpose of this pull request?

  • Bug fix

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

Signed-off-by: CGQAQ <m.jason.liu@outlook.com>
@CGQAQ CGQAQ changed the title fix: fix 4964 [WIP] fix: fix 4964 Sep 19, 2021
Signed-off-by: CGQAQ <m.jason.liu@outlook.com>
@CGQAQ CGQAQ changed the title [WIP] fix: fix 4964 fix: fix 4964 Sep 19, 2021
@CGQAQ CGQAQ changed the title fix: fix 4964 fix: fix 4964(Windows drive letter inconsistency) Sep 19, 2021
Signed-off-by: CGQAQ <m.jason.liu@outlook.com>
@CGQAQ
Copy link
Contributor Author

CGQAQ commented Sep 19, 2021

Ready for review

@CGQAQ CGQAQ changed the title fix: fix 4964(Windows drive letter inconsistency) fix(vite): fix 4964(Windows drive letter inconsistency) Sep 19, 2021
Shinigami92
Shinigami92 previously approved these changes Sep 19, 2021
packages/vite/src/node/utils.ts Outdated Show resolved Hide resolved
Co-authored-by: patak <matias.capeletto@gmail.com>
@patak-dev patak-dev merged commit 723cd63 into vitejs:main Sep 20, 2021
@CGQAQ CGQAQ deleted the fix_4964 branch September 20, 2021 14:16
ygj6 pushed a commit to ygj6/vite that referenced this pull request Sep 22, 2021
aleclarson pushed a commit to aleclarson/vite that referenced this pull request Nov 8, 2021
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 16, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps generated by esbuild (and therefore completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1]. It doesn't change anything when using
SvelteKit (where the problem did not exist in the first place). When
using SolidStart, the problem still persists, likely because it doesn't
use the `transformWithEsbuild` function, and therefore needs a follow up
fix.

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

cc @jecfish

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 16, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps generated by esbuild (and therefore completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1]. It doesn't change anything when using
SvelteKit (where the problem did not exist in the first place). When
using SolidStart, the problem still persists, likely because it doesn't
use the `transformWithEsbuild` function, and therefore needs a follow up
fix.

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 16, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps generated by esbuild (and therefore completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1]. It doesn't change anything when using
SvelteKit (where the problem did not exist in the first place). When
using SolidStart, the problem still persists, likely because it doesn't
use the `transformWithEsbuild` function, and therefore needs a follow up
fix.

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 16, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps generated by esbuild (and therefore completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1]. It doesn't change anything when using
SvelteKit (where the problem did not exist in the first place). When
using SolidStart, the problem still persists, likely because it doesn't
use the `transformWithEsbuild` function, and therefore needs a follow up
fix.

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 23, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps for transformer outputs (and thereby completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1].

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 23, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps for transformer outputs (and thereby completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1].

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 24, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps for transformer outputs (and thereby completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1].

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
bmeurer added a commit to bmeurer/vite that referenced this pull request Feb 24, 2023
This refines the fix from vitejs#4985 to
turn absolute paths into relative paths for the `sources` array in
source maps for transformer outputs (and thereby completely avoids the
Windows drive letter problem). In order to minimize unintended negative
side effects, we perform this step only when the source file name is
absolute.

This addresses the issue that source files show up with an absolute path
prefix in case of Vue[^1].

Bug: https://crbug.com/1411596
Ref: vitejs#4964
Ref: vitejs#4912

[^1]: https://goo.gle/devtools-vite-interoperability
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Source map genrating issue devserver inline sourcemap is pointing to the wrong url
3 participants