Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Install openmrs-module-spa on your OpenMRS server
  2. Create a directory, in which we will create a packmap package (see the following instructions). You'll probably want to make it a github repository, like this one.
  3. In this directory, create a package.json based on the packmap OpenMRS example
  4. Create an override-import-map.json file (see the example) with the line
        "@openmrs/esm-root-config": "/openmrs/frontend/@openmrs/esm-root-config@1.1.1/dist/openmrs-esm-root-config.defaults.js"
    where 1.1.1 is the version of @openmrs/esm-root-config that you have in your package.json
  5. npm install
  6. npm run build
  7. Symlink* the resultant openmrs/frontend directory into your OpenMRS server's application data directory as "frontend". For my SDK server named "foo", on Linux, I do

      ln -s $(realpath openmrs/frontend) ~/openmrs/foo/frontend

  8. Start the OpenMRS server

  9. Navigate to localhost:8080/openmrs/spa/login (assuming your server is at localhost:8080)

  10. If the page comes up blank...
    1. Open the browser developer console (probably Ctrl+Shift+i)

    2. Work through the errors with the Troubleshooting Guide (forthcoming)

At this point, you should have microfrontends working entirely offline!

...