Describe the bug
in docs https://connect.build/docs/web/generating-code
Output
Let's take a peek at what was generated. There are two new files:
gen/buf/connect/demo/eliza/v1/eliza_connect.ts
gen/buf/connect/demo/eliza/v1/eliza_pb.ts
The first file was generated by protoc-gen-connect-es and contains the service:
import { SayRequest, SayResponse } from "./eliza_pb.js";
import { MethodKind } from "@bufbuild/protobuf";
import { SayRequest, SayResponse } from "./eliza_pb.js";
should be
import { SayRequest, SayResponse } from "./eliza_pb";
or
import { SayRequest, SayResponse } from "./eliza_pb.ts";
Environment (please complete the following information):
If you want to write TypeScript with ECMAScript modules that works on Node.js and other environments, you have to use a .js
extension in import paths to .ts
files. See this lengthy explanation.
This is also reflected in the code we generate. You can change or remote the extension in generated import paths with this option if you prefer.
Owner Name | bufbuild |
Repo Name | connect-es |
Full Name | bufbuild/connect-es |
Language | TypeScript |
Created Date | 2022-02-16 |
Updated Date | 2023-03-24 |
Star Count | 852 |
Watcher Count | 20 |
Fork Count | 33 |
Issue Count | 17 |
Issue Title | Created Date | Updated Date |
---|