You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I work with JavaScript and use ESM modules a lot.
The environment I work in does not support using a bundler/build tool. And since I deploy to the browser, my import statements look like this:
import{request}from"./utils/http.js?v=5"
Whenever, I update the file http.js, I append a query parameter (ex. ?v=5) to the file name so that the browser will know not to pull the file from its cache, but instead request a fresh copy.
But now when I ⌘ + <click> on the file name, Zed opens a new file buffer with the file name that includes the query parameter. This behavior is not what I expected.
To re-state: Instead of opening the file ./utils/http.js, it opens a non-existent ./utils/http.js?v=5 in a new buffer.
I wonder if by default, Zed could ignore that part of the file name when resolving its path. I can't imagine that it is a common occurrence for a question mark symbol to be present in a file's extension.
For the exceptional cases where a ? is part of the file's name, there could be a setting that, when turned on, would consider that as part of the file’s path.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I work with JavaScript and use ESM modules a lot.
The environment I work in does not support using a bundler/build tool. And since I deploy to the browser, my import statements look like this:
Whenever, I update the file
http.js
, I append a query parameter (ex.?v=5
) to the file name so that the browser will know not to pull the file from its cache, but instead request a fresh copy.But now when I
⌘ + <click>
on the file name, Zed opens a new file buffer with the file name that includes the query parameter. This behavior is not what I expected.To re-state: Instead of opening the file
./utils/http.js
, it opens a non-existent./utils/http.js?v=5
in a new buffer.I wonder if by default, Zed could ignore that part of the file name when resolving its path. I can't imagine that it is a common occurrence for a question mark symbol to be present in a file's extension.
For the exceptional cases where a
?
is part of the file's name, there could be a setting that, when turned on, would consider that as part of the file’s path.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions