A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/gopherjs/gopherjs/issues/524 below:

Proposal: add option to build browserify

I'm interested in having Gopherjs produce rather than a single javascript file, multiple files - one for each Go package. This would provide huge benefits to those of us using a modern modular workflow for building apps, as tools like Webpack could better understand the relationships between the different pieces of code in the output JavaScript, and re-compile only the packages that change when bundling after a gopherjs build.

Currently in the output code, each Go package is set as a property on $packages. In a modular output, each Go package could go into its own file, and use module.exports to export what would have been set on $packages before. Then, code that previously would do something like $packages["github.com/gopherjs/js"] could instead do require("./github.com/gopherjs/js"). The output code tree could just match the names of the packages. A common package could be referenced for all of the common code that ends up at the beginning of the output file right now.

Is this something that would be feasible to implement in GopherJS?

tomByrer, OneOfOne, itsmontoya, siegesmund, shelby3 and 3 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4