Closed SetoKaiba closed 1 year ago
Can you tell us about your use case? Generally speaking, these are different module systems and I'm not sure if there's a way to get node to understand closure modules.
I want to use it with Angular. I'm not sure what's the preferred way to use with it. I thought that the closure is a google product as well. It maybe better with Angular, protobuf-javascript and Closure.
From asking around and doing a bit of digging online, it seems like the best option is to use google-protobuf with commonjs imports with angular. Our understanding is that most users rely on commonjs for bundling.
The doc only mentions how to use closure with browser. How to use it with normal node.js apps?
I npm install google-closure-library and google-protobuf. I generated the myproto_libs.js with protoc-gen-js.
How to use the myproto_libs.js with it? I know that I can use commonjs style. And it works. But I'd like to know the closure style usage.