-
Notifications
You must be signed in to change notification settings - Fork 72
Why package are ignored for CommonJS importation #188
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
Comments
Hi, I'm not particularly familiar with commonjs strict mode's requirements and not understanding the issue at play. I've tried putting together a repro scenario like this:
My message in a.proto depends on b.proto:
I generate my code with: Now, digging into the produced gencode of a_pb.js, we see a couple of things: (notably "use strict" is missing at the top. I'm assuming you are a manually editing it into the files, so I'll add it in myself)
So, we are importing the B message, stashing it into our My index.js file looks like:
This runs ok and has the expected output. Can tell me a bit more about the scenario details where you're having a problem? In your proposed change (#189), I think you are just changing the trailing |
Ola Guys!
I've this line :
in the documentation, and I was wondering what is the reason behind this decision ? I'm going with commonjs_strict type of file but my code is not working correctly (unable to find an object from another file) due to absence of package namespace.
The text was updated successfully, but these errors were encountered: