vite-plugin-remote-assets
vite-plugin-remote-assets copied to clipboard
Doesn't work with urls that have query parameters
Describe the bug
lets say when url has ?format=2500w then it doesn't work,
I used custom regex to try to make this work
{ match: /\b(https?:\/\/[\w#&?./-]*?\.(?:png|jpe?g))(?:\?[^'"\s)]*)?(?=[`'")\]]|\s|$)/gi }
but:
Error: ENOENT: no such file or directory, open 'C:\Users\xxx\Desktop\myapp\node_modules\.remote-assets\_3ViVgJl_PeAyCPJ2JJpRd-z_mPSBWTRzYbSNn9SkvE.jpg?format=2500w
Reproduction
just append some query param
System Info
System:
OS: Windows 11 10.0.26100
CPU: (32) x64 AMD Ryzen 9 7950X3D 16-Core Processor
Memory: 35.24 GB / 63.09 GB
Binaries:
Node: 22.13.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
npm: 11.0.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 9.12.2 - ~\AppData\Local\pnpm\pnpm.EXE
bun: 1.2.9 - ~\.bun\bin\bun.EXE
Browsers:
Edge: Chromium (131.0.2903.70)
Internet Explorer: 11.0.26100.1882
Used Package Manager
pnpm
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guide.
- [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
- [x] The provided reproduction is a minimal reproducible of the bug.
Contributions
- [ ] I am willing to submit a PR to fix this issue
- [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)