You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The disadvantage of this method is there is no awareness of what files have already been built and are up to date, thus every time the phase is invoked the entire thing re-runs whether or not the dependencies have changed.
Replicating the same via a standard Makefile enables only changed files to need to be rebuilt, and for jobs to be run in parallel.
Example Makefile (yeah, I know I like using variables...)
(It's worth noting my workstation is fairly fast, and the actual numbers when run on our standard CI hardware are roughly double this, so the ratio difference becomes potentially more dramatic on a CI server or laptop.):
Note, I don't believe we should switch to a Makefile here, as currently this works via just NPM such that it doesn't matter if someone is on a Windows machine (which may not have Make installed). However, I strongly suspect there is a way to get JS build tools to do something similar.
We already have both webpack and rollup as a dev dependency here, so I'd be loathe to install yet another build tool. Perhaps one of them can handle it? Leaving this as notes for myself in the future to look into and tackle this!
CC FE folx (@jtrein@jdville03@sophiacodes) if you know the best practice/tool here, feel free to drop some notes to help me out when I get around to this one day.
The text was updated successfully, but these errors were encountered:
Encountered this separately while working on the other build stuff, carving out as a separate issue to remind myself for the future.
Currently the
build:esm
phase (which is prerequisite of runningrelease
) is defined via npm scripts such as:The disadvantage of this method is there is no awareness of what files have already been built and are up to date, thus every time the phase is invoked the entire thing re-runs whether or not the dependencies have changed.
Replicating the same via a standard Makefile enables only changed files to need to be rebuilt, and for jobs to be run in parallel.
Example Makefile (yeah, I know I like using variables...)
Comparative benchmarks on my workstation
(It's worth noting my workstation is fairly fast, and the actual numbers when run on our standard CI hardware are roughly double this, so the ratio difference becomes potentially more dramatic on a CI server or laptop.):
Note, I don't believe we should switch to a Makefile here, as currently this works via just NPM such that it doesn't matter if someone is on a Windows machine (which may not have Make installed). However, I strongly suspect there is a way to get JS build tools to do something similar.
We already have both webpack and rollup as a dev dependency here, so I'd be loathe to install yet another build tool. Perhaps one of them can handle it? Leaving this as notes for myself in the future to look into and tackle this!
CC FE folx (@jtrein @jdville03 @sophiacodes) if you know the best practice/tool here, feel free to drop some notes to help me out when I get around to this one day.
The text was updated successfully, but these errors were encountered: