sagiegurari / node-go-require

Load Google GO files as any javascript modules under nodeJS runtime.
Apache License 2.0
154 stars 10 forks source link

Would the resulting node.js code be browserifyable? #2

Closed jackkleeman closed 7 years ago

sagiegurari commented 7 years ago

Can you please explain the use case here? If it is to run it in the browser, you should have some build script to generate js files from your go files and serve them via your http server. This project is to enable you to run go files in the server side (node.js) and that doesn't need browserify. So maybe I'm missing something?

jackkleeman commented 7 years ago

I guess what I'm asking is if I can use your module to import a go package into a node.js file, and then browserify that node.js file, to produce a browser-runnable js file. It sounds like that wouldn't be possible?

sagiegurari commented 7 years ago

maybe it would but it is really not the target of this project. still, I believe it should work but might result in huge duplicates of code, not sure. never tried it. are you running browserify in some express middleware in runtime?

sagiegurari commented 7 years ago

closing old issue