Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add .js suffix to proto cross-reference imports
When importing a cross-referenced file, a line like this is generated: import { MyMessage } from '../myother/myother' .. assuming there's a proto at ../myother/myother.proto But if we add the suffix '.pb.ts' to the generated files: import { MyMessage } from '../myother/myother.pb' Is not recognized as a TypeScript import by tsc because of the .pb suffix. To fix this, we can just add .js, and the TypeScript compiler recognizes that we actually mean the .ts file: import { MyMessage } from '../myother/myother.pb.js' Fixes stephenh#601 Signed-off-by: Christian Stewart <christian@paral.in>
- Loading branch information