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
While buf supports a rewrite_imports option, it currently uses the : character to separate the search/replace terms of the rewrite. This means you can't rewrite to a URL, which is what I would like to be able to do in Deno. example code.
Right now, my workaround is to rewrite to a relative import, (which has its own bug), and then import and re-export the library from there.
Possible solutions:
Only split on the first :, thus allowing there to be : characters in the replace.
Allow escaping : characters. (But this might get a bit ugly because you might end up having to double-escape in yaml?)
The text was updated successfully, but these errors were encountered:
The rewrite_imports option was actually written with only npm in mind. We don't officially support Deno yet, so that's why this option doesn't support rewriting to a URL.
However, we know this is something that may be required in the future for full Deno support, so we will keep this open. When we address Deno at a later date, we will make sure this is part of the implementation.
smaye81
changed the title
rewrite_imports: Please support rewriting to URLs
Support allow rewrite_imports to rewrite to URLs
May 8, 2023
smaye81
changed the title
Support allow rewrite_imports to rewrite to URLs
Support allowing rewrite_imports to rewrite to URLs
May 8, 2023
I believe @marekbuild told me to create this issue in slack.
While buf supports a
rewrite_imports
option, it currently uses the:
character to separate the search/replace terms of the rewrite. This means you can't rewrite to a URL, which is what I would like to be able to do in Deno. example code.Right now, my workaround is to rewrite to a relative import, (which has its own bug), and then import and re-export the library from there.
Possible solutions:
:
, thus allowing there to be:
characters in the replace.:
characters. (But this might get a bit ugly because you might end up having to double-escape in yaml?)The text was updated successfully, but these errors were encountered: