-
Notifications
You must be signed in to change notification settings - Fork 65
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
Allow custom import prefix #992
Comments
Great idea! We are facing the same problem while switching our services from nodejs to deno2. An optional import prefix would definitely help! 👍 |
I support this idea. Helps us too! |
This is about the npm-specifier for import statements, as in: import express from "npm:[email protected]"; And the goal would be to change generated imports for the runtime library: import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1";
import type { UInt32Value } from "@bufbuild/protobuf/wkt"; To... what exactly? Should it be |
@timostamm Adding a prefix via options for the protoc-gen-es plugin would do the trick and would be flexible for the future. Default empty string. So option 1 would be perfect! :)
should be enough. The imports which work are the following:
|
With Deno 2 comes support for NPM packages.
I would like to use the generated code in my Deno 2 Project but it creates the imports without the npm: prefix. Editing this in manually works no issues.
Providing an optional import prefix would resolve this issue.
I understand that this is not a bug but I think this would benefit everyone using Deno 2 in the future.
The text was updated successfully, but these errors were encountered: