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:vitejs#5265 Add disableDotRule option to allow path contains dot #6170

Closed
wants to merge 2 commits into from

Conversation

gauntiantian
Copy link

@gauntiantian gauntiantian commented Dec 18, 2021

Description

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

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.

@gauntiantian gauntiantian changed the title 修复 issue https://github.com/vitejs/vite/issues/5265 Add disableDotRule option to allow path contains dot Dec 18, 2021
@Shinigami92 Shinigami92 added the YAO Yet another option... label Dec 18, 2021
@Shinigami92
Copy link
Member

I'm not sure if this is the right solution 🤔

@Niputi
Copy link
Contributor

Niputi commented Dec 18, 2021

please correct title with (fix) and add a description telling which issue this will fix and why you believe this is the correct way to fix the issue

@bluwy
Copy link
Member

bluwy commented Dec 19, 2021

I don't see what this solves either. @gauntiantian Can you provide some context as to why this is needed?

@gauntiantian gauntiantian changed the title Add disableDotRule option to allow path contains dot Fix:vitejs#5265 Add disableDotRule option to allow path contains dot Dec 20, 2021
@gauntiantian
Copy link
Author

@Niputi
Copy link
Contributor

Niputi commented Dec 20, 2021

please provide tests for this and give more of an explanation than just a link

@David-Mueller
Copy link

Hi,
I guess I would benefit from this as well.

If route parameters of a vue app include dots (like a JWT), the route param won't be matched by Vite's dev server.
There was a "disableDotRule" option in webpack dev server to get around that as well: https://webpack.js.org/configuration/dev-server/#devserverhistoryapifallback

@andreas-ateles
Copy link

I need this in my project as well.

For example to display file information about a file in the app, an URL like this is used: example.com/file-info/some/path/to/file.txt

Currently the Vite dev server 404s when such URLs with a dot are loaded.

What do we need to do to get this merged?

@sapphi-red
Copy link
Member

This is a duplicate of #2634. Closing this PR as #2634 includes more information.

@sapphi-red sapphi-red closed this Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs test YAO Yet another option...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants