Page MenuHomePhabricator

Research: Use a JS module bundler to output a single JS file
Open, Stalled, MediumPublic5 Estimated Story Points


As part of T124713 I made two patches: one for today (present), one for tomorrow (future)

The second patch is much more advanced. It uses a JavaScript module bundler (
The biggest benefit for us is dependency management using ES6 module system.
This would help us to refactor the code into SRP modules that will be a lot easier to develop/improve/test/maintain...
Please take a look, and we can discuss it tomorrow.

Here is a link to the second patch:

Let's track this work as a technical research task.
Most of the work is done, but before approving it and merging it we need more review and testing.

Event Timeline

JGirault claimed this task.
JGirault raised the priority of this task from to Needs Triage.
JGirault updated the task description. (Show Details)
JGirault added a subscriber: JGirault.

Hey @JGirault, can you comment more on why this patch is needed? I'm not very clear on the purpose and what the difference is for the "today" and "future" patches.


For a user standpoint, this patch is not needed.
For us engineers/developers, this patch add a great structure to the currently-not-so-structured code. This kind of patch can really increase code quality and developer performance.

I'm just gonna quote :

What are modules, and why should we use them?
A module is just a JavaScript file that is explicit about what it needs in order to run, and what code it makes available to the outside world. Breaking your program apart like this makes it much easier to write good, maintainable code, because you only need to focus on one thing at a time.


In short, modules help us write code that is

  • reusable
  • maintainable
  • testable
  • easier to collaborate on, because Alice and Bob can work on the same app simultaneously (Alice can work on dictionary while Bob fixes extractWords) without stomping each other's changes
  • more bug-resistant, because we don't need to worry about things like naming conflicts between modules
debt triaged this task as Medium priority.Jan 29 2016, 4:20 PM
debt moved this task from Backlog to To Discuss on the Discovery-Portal-Sprint board.

@JGirault has already written most of the code for this ticket - but we still have unanswered questions. He'll reach out to other peeps to research.

debt changed the task status from Open to Stalled.Mar 14 2016, 2:12 PM

Hi @JGirault - I'd like to move this to the backlog if we don't have time to work on it right now. Please advise.

As I said before,

This kind of patch can really increase code quality and developer performance.

My suggestion is: Do it or abandon it. Don't move it to the backlog forever.
Whether or not you want to do it, it is not my call.

@JGirault: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Please claim this task again when you plan to work on it (via Add Action...Assign / Claim in the dropdown menu) - it would be welcome. Thanks for your understanding!