-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix the bug that commonjs doesn't work for @azure/web-pubsub-client-protobuf #27209
Conversation
eb5138e
to
d798b40
Compare
d798b40
to
127d563
Compare
API change check API changes are not detected in this pull request. |
I believe
|
@jeremymeng Maybe I'm wrong, but I think
|
@zackliu you are right! I don't know why we don't have |
@@ -0,0 +1,33 @@ | |||
import nodeBuiltins from "builtin-modules"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe use makeConfig
from dev-tool if it works for you?
import { makeConfig } from "@azure/dev-tool/shared-config/rollup";
export makeConfig(require("./package.json"));
maybe because the assumption is that all input are ESM. But in your case, if I understand correctly, some generated CJS files got copied over? |
127d563
to
f7aa8e7
Compare
f7aa8e7
to
809c613
Compare
@jeremymeng I tried, and it works. Yes in this case, protobufjs is cjs and needs to be copied in |
builds failing likely because of missing |
@jeremymeng Test passed. Please help to merge it. |
Packages impacted by this PR
@azure/web-pubsub-client-protobuf
Issues associated with this PR
#25703
Describe the problem that is addressed by this PR
As protobufjs is purely commonjs type but rollup bundle didn't add commonjs support. So only file in
dist-esm/
works but indist
doesn't.Are there test cases added in this PR? (If not, why?)
Test already added
cjs()
plugin in bundle, so it works.Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists