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

chinese base config trigger the url parse error #10534

Closed
7 tasks done
PengBoUESTC opened this issue Oct 19, 2022 · 1 comment
Closed
7 tasks done

chinese base config trigger the url parse error #10534

PengBoUESTC opened this issue Oct 19, 2022 · 1 comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@PengBoUESTC
Copy link
Contributor

Describe the bug

if I config the base as a chinese string, such as /测试/, the url is parsed as https://xxx.com:443/测试, but in browser, there will be an error about url parse, like this
image

Reproduction

https://stackblitz.com/edit/vitejs-vite-iymbaj?file=vite.config.ts

Steps to reproduce

change the base config to '/测试/' , and refresh the page

System Info

System:
    OS: macOS 11.6
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 1.44 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.6 - ~/.nvm/versions/node/v14.17.6/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.6/bin/yarn
    npm: 6.14.15 - ~/.nvm/versions/node/v14.17.6/bin/npm
    Watchman: 2022.08.29.00 - /usr/local/bin/watchman
  Browsers:
    Edge: 97.0.1072.62
  npmPackages:
    @vitejs/plugin-basic-ssl: ^0.1.1 => 0.1.1 
    @vitejs/plugin-legacy: ^1.8.2 => 1.8.2 
    @vitejs/plugin-vue2: ^1.1.2 => 1.1.2 
    vite: ^3.0.7 => 3.0.9

Used Package Manager

npm

Logs

No response

Validations

@PengBoUESTC
Copy link
Contributor Author

#10247

viteBaseMiddleware parse the url different from resolveConfig because of the different url parse API

@sodatea sodatea added the p3-minor-bug An edge case that only affects very specific usage (priority) label Nov 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 27, 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

No branches or pull requests

2 participants