From 3ca827aced0caee498ad07fcc9adb08d06464222 Mon Sep 17 00:00:00 2001 From: Ian Date: Tue, 31 Jan 2023 15:44:14 -0500 Subject: [PATCH] (docs) Update an outdated FAQ about importmaps --- docs/main/faq.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/main/faq.md b/docs/main/faq.md index 8578972d4..3f8138108 100644 --- a/docs/main/faq.md +++ b/docs/main/faq.md @@ -28,15 +28,14 @@ git checkout package.json yarn ``` -## Refreshing importmap +### Using a custom importmap -The static importmap file used by `openmrs develop` is manually updated and therefore often out of date containing old versions of the frontend modules. You can submit a PR to update [that file](https://github.com/openmrs/openmrs-esm-core/blob/master/packages/shell/esm-app-shell/src/assets/importmap.json), or you can use an import map from the internet like so: +By default, when you run `yarn start`, the command will use the importmap from dev3, that is, https://dev3.openmrs.org/openmrs/spa/importmap.json. This is the default importmap for the reference application and generally what you will want to use. However, in some situations, you may want to us a custom importmap, such as a distribution-specific importmap. In this case, you can use the `--importmap` argument to the `yarn start` command to point to any importmap you like: ```sh -yarn start --importmap "https://spa-modules.nyc3.digitaloceanspaces.com/import-map.json" +yarn start --importmap "https://dev3.openmrs.org/openmrs/spa/import-map.json" ``` - ### Clearing out the browser cache By default the server [tells your browser](https://github.com/openmrs/openmrs-contrib-ansible-docker-compose/blob/c36115ca22b8fb842f8cf0ff745d1d35a4567912/files/emr-3-dev/proxy.conf#L97) to cache JavaScript files for 30 days. You can [bypass your browser's cache](https://en.wikipedia.org/wiki/Wikipedia:Bypass_your_cache) when refreshing the page. If you want to keep the cache disabled while you are developing, open your browser's developer tools, go to the "Network" tab, and check "Disable Cache." The cache will only be disabled while the developer tools are open, and only for the page that they are attached to.