sfbrigade / bats-server

Routed is an app to help ambulances direct non-critical patients to hospital emergency rooms with the most availability.
https://routedapp.org/
GNU Affero General Public License v3.0
18 stars 12 forks source link

Rewrite references to `node_modules` #269

Open fwextensions opened 1 year ago

fwextensions commented 1 year ago

There are several places where paths reference files inside of node_modules. These paths are brittle, as the packages can change, or the package manager can move things around. The files should be imported through the normal mechanisms instead.

francisli commented 1 year ago

I don't have any ideas on immediate changes/fixes for this...

I think this issue would go away if we re-implement the login page in the SPA client and then these can be compiled into the bundle with webpack.

fwextensions commented 1 year ago

Ah, right, the login page is just static files, so it needs a known location for the CSS. I think webpack can rewrite the paths in the static files so they point to a built location, as opposed to fully bringing them into the SPA.

There are also places in the client code where modules are imported from paths inside node_modules, which should be cleaned up as well, mostly around USWDS assets.