Skip to content
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

How to skip useless import path #154

Open
chenjie199234 opened this issue Nov 29, 2022 · 2 comments
Open

How to skip useless import path #154

chenjie199234 opened this issue Nov 29, 2022 · 2 comments
Labels
cleanup enhancement New feature or request triaged Issue has been triaged

Comments

@chenjie199234
Copy link

chenjie199234 commented Nov 29, 2022

I have a import which is not used for javascript
When use this plugin to generate the code, the useless import become a require(xxx)
How to disable this.
1

2

@dibenede
Copy link
Contributor

dibenede commented Nov 29, 2022

This seems like a reasonable FR. We don't generate code for services and proto options, so this is a surprise to see.

Relevant bit of code: https://github.com/protocolbuffers/protobuf-javascript/blob/main/generator/js_generator.cc#L3651-L3657

@dibenede dibenede added enhancement New feature or request cleanup triaged Issue has been triaged labels Nov 29, 2022
@chenjie199234
Copy link
Author

@dibenede
I want to generate both the server's code and the browser's javascript code
Some import is only for server like field value validate extend
Need a way to skip this, there are too may other extends can be find on github

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup enhancement New feature or request triaged Issue has been triaged
Projects
None yet
Development

No branches or pull requests

2 participants