From 47663f176738978586ac402b7706b92eb4b8d2ba Mon Sep 17 00:00:00 2001 From: Joji Wakairo Date: Thu, 29 Feb 2024 20:30:39 +0900 Subject: [PATCH] Add how to support legacy browsers to README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 8da2815..940c62c 100644 --- a/README.md +++ b/README.md @@ -242,6 +242,15 @@ Importmap for Rails provides two commands to check your pinned packages: - `./bin/importmap outdated` checks the NPM registry for new versions - `./bin/importmap audit` checks the NPM registry for known security issues +## Supporting legacy browsers such as Safari on iOS 15 + +If you want to support [legacy browsers that do not support import maps](https://caniuse.com/import-maps) such as [iOS 15.8.1 released on 22 Jan 2024](https://support.apple.com/en-us/HT201222), insert [`es-module-shims`](https://github.com/guybedford/es-module-shims) before `javascript_importmap_tags` as below. + +```erb + +<%= javascript_importmap_tags %> +``` + ## License Importmap for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).