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

Import of @vite-plugin-checker-runtime does not respect base, resulting in requests to invalid URL #135

Closed
2 tasks done
ascott18 opened this issue Apr 13, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@ascott18
Copy link
Contributor

Describe the bug

I proxy my vite dev server through an ASP.NET Core application in order to mimic how the app will behave in production.

In order to do this, I set a base in vite.config.ts of /vite_hmr/ when in serve mode, and then use this path to determine which requests need to be proxied from ASP.NET Core to vite. However, the injected @vite-plugin-checker-runtime does not respect this setting, resulting in the request getting past the proxy middleware and hitting my SPA fallback endpoint, which serves HTML.

Reproduction

  • Set base in vite.config.ts to any path other than /.
  • Observe when running in serve mode that @vite-plugin-checker-runtime is not requested from that path, but always from the root (/).

Expected behavior

The import of the @vite-plugin-checker-runtime script respects the configured value of base.

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
    Memory: 12.01 GB / 31.94 GB
  Binaries:
    Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.1.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 100.0.4896.75
    Edge: Spartan (44.19041.1266.0), Chromium (100.0.1185.36)
    Internet Explorer: 11.0.19041.1566
  npmPackages:
    vite-plugin-checker: 0.4.5 => 0.4.5

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fi3ework fi3ework added the bug Something isn't working label Apr 14, 2022
@fi3ework
Copy link
Owner

it should be fixed in 0.4.6, have a try.

@ascott18
Copy link
Contributor Author

Works perfect. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants