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

Browser return 404 when path includes .(dot) #5632

Closed
kazuooooo opened this issue Nov 11, 2021 · 4 comments
Closed

Browser return 404 when path includes .(dot) #5632

kazuooooo opened this issue Nov 11, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@kazuooooo
Copy link

Describe the bug

vite crash with browser 404 when path includes .(dot) character.

Works with out dot
_htmlWebpackPlugin_options_title

Crash with dot
localhost_と_ネットワーク

It works well when I use vue-cli, so it looks a bug.

Reproduction

Repo is here

First, create a project with vue-cli.

~/g/g/k/L/vite (master ⚡☡+) vue create hello-world
Vue CLI v4.5.15
? Please pick a preset: Manually select features
? Check the features needed for your project: Choose Vue version, Babel, TS, Linter
? Choose a version of Vue.js that you want to start the project with 3.x
? Use class-style component syntax? No
? Use Babel alongside TypeScript (required for modern mode, auto-detected polyfills, transpiling JSX)? Yes
? Pick a linter / formatter config: Prettier
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No

At this time URL includes dots works well. (see this branch and access dot included URL like localhost://hoge.baz)

After that, I migrate this project to vite. (see this branch)
Then I can not access dot included URL.

System Info

~/g/g/k/migrate-to-vite (vite) npx envinfo --system --npmPackages '{vite,@vitejs/*}' --binaries --browsers


npx: 1個のパッケージを0.726秒でインストールしました。

  System:
    OS: macOS 11.5.2
    CPU: (20) x64 Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
    Memory: 81.19 GB / 128.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.1 - ~/.nvm/versions/node/v14.16.1/bin/node
    Yarn: 1.22.15 - ~/.nvm/versions/node/v14.16.1/bin/yarn
    npm: 6.14.12 - ~/.nvm/versions/node/v14.16.1/bin/npm
  Browsers:
    Chrome: 95.0.4638.69
    Firefox: 84.0.1
    Safari: 14.1.2
  npmPackages:
    @vitejs/plugin-vue: ^1.9.4 => 1.9.4 
    vite: ^2.6.14 => 2.6.14 


### Used Package Manager

yarn

### Logs

_No response_

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@ygj6
Copy link
Member

ygj6 commented Nov 11, 2021

duplicate of #4344

I created a PR, but somehow got stuck, maybe I will try again

@Lord-Y
Copy link

Lord-Y commented Jan 2, 2022

@ygj6 Can you give me a status about your PR? I have the same problem. An uri like /raw/1.2.3 is not working with:

"vite": "^2.7.10",
"vue-router": "^4.0.12"

I can also had that @skirtle on discord noticed that /raw/1.2.3/ is working.

@ygj6
Copy link
Member

ygj6 commented Jan 4, 2022

@ygj6 Can you give me a status about your PR? I have the same problem. An uri like /raw/1.2.3 is not working with:

"vite": "^2.7.10",
"vue-router": "^4.0.12"

I can also had that @skirtle on discord noticed that /raw/1.2.3/ is working.

Sorry, this one doesn't have a high priority here and hasn't recently started working on it.

@bluwy
Copy link
Member

bluwy commented Mar 13, 2022

Closing as duplicate of #4344

@bluwy bluwy closed this as completed Mar 13, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants