Enhance build to load fonts from node modules
Add an enhancement to the build to load fonts from node modules and include them in the UI bundle. This allows the build to leverage fonts distributed via npm, namely the ones provides by the typefaces project.
Taking a page from webpack, if the font path begins with
~, interpret the remainder of the path as being relative to the
node_modules directory. For example:
The fonts should be copied to the
font folder in the bundle without any other path segments. The value of any
url() in the CSS that points to one of these fonts should be rewritten using the path to the font in the UI bundle.
I prefer to control the font-face definitions, so this reference will come from a CSS file in this project.