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

When the file path is an absolute path, injectQuery will clear the parameters. #10448

Closed
7 tasks done
yzydeveloper opened this issue Oct 12, 2022 · 0 comments · Fixed by #10449
Closed
7 tasks done

When the file path is an absolute path, injectQuery will clear the parameters. #10448

yzydeveloper opened this issue Oct 12, 2022 · 0 comments · Fixed by #10449
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@yzydeveloper
Copy link
Contributor

Describe the bug

I'm bringing an unbuilt and published component library into the project to use.
But when I go to reference the components in this component library, vite:resolve will clear the parameters of the .vue file path, causing plugin-vue to fail to resolve correctly

Error: Uncaught SyntaxError: The requested module '/node_modules/@ui/components/Test.vue?v=7ab6c6de' does not provide an export named 'render' (at Test.vue?v=7ab6c6de:2:10)

// file url
E:/_yzydeveloper/vite-resolve-url-encode/node_modules/@ui/components/Test.vue?vue&type=template&lang.js

// resolve normal
import { render as __vue2_render, staticRenderFns as __vue2_staticRenderFns } from "/node_modules/@ui/components/Test.vue?v=7ab6c6de&vue&type=template&lang.js"

// resolve error
import { render as __vue2_render, staticRenderFns as __vue2_staticRenderFns } from "/node_modules/@ui/components/Test.vue?v=7ab6c6de"

Reproduction

https://github.com/yzydeveloper/vite-resolve-url-encode-demo

Steps to reproduce

Run pnpm install, then pnpm run dev

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (4) x64 Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
    Memory: 2.60 GB / 7.89 GB
  Binaries:
    Node: 16.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 2.4.3 - ~\node_modules\.bin\yarn.CMD
    npm: 7.22.0 - ~\AppData\Roaming\npm\npm.CMD
  Browsers:
    Chrome: 106.0.5249.103
    Edge: Spartan (44.19041.1266.0), Chromium (106.0.1370.42)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Logs

No response

Validations

@sapphi-red sapphi-red added the p3-minor-bug An edge case that only affects very specific usage (priority) label Oct 20, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants