openlaw-client
openlaw-client copied to clipboard
clean up JS build sytem (details TBD)
As mroth mentioned, right now the JS build system is very difficult to reason about as we have a few overlapping tools with complex rulesets. We should clean this up.
For example, it's possible (and even likely) that we may not need to use both rollup and webpack, since they have overlapping functionality.
As it is, we currently have 3 different things managing transform rules in the build:
- some manual npm "shell" scripts that have the notion of dependencies built in via recursively calling other npm scripts (see
build:esm
) - rollup
- webpack, which appears to duplicate some of the above two, but is used when folks run in
--watch
mode?
Both webpack/rollup can do watch vs builds, so it would be good to consolidate this, and get the npm script rules into the same configs.
In addition, this would ideally be done with #48 in mind -- e.g. having "already up to date" file awareness for build transforms, as currently the JS section of the build can take upwards of 5-8 minutes on a slower machine, and the entire thing is redone every time.
@jtrein we'd love your help with this project whenever you're looking for a new task
Would love to. I am busy with web worker things right now, but I will definitely look into this.
Nothing's been done on this, yet, correct? There is some discussion happening in the client's Slack channel, but it is about just getting the build to be containerized and working, before we optimize what is mentioned in this issue?
Nothing's been done on this, yet, correct? There is some discussion happening in the client's Slack channel, but it is about just getting the build to be containerized and working, before we optimize what is mentioned in this issue?
Correct. There have been some minor edits made just around getting things working, but the overall build system consolidation question was punted on so we can discuss and design when convenient.