Skip to content

Commit f2779ee

Browse files
authored
Add how to support legacy browsers to README (#249)
1 parent ddf9be4 commit f2779ee

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ Importmap for Rails provides two commands to check your pinned packages:
242242
- `./bin/importmap outdated` checks the NPM registry for new versions
243243
- `./bin/importmap audit` checks the NPM registry for known security issues
244244

245+
## Supporting legacy browsers such as Safari on iOS 15
246+
247+
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.
248+
249+
```erb
250+
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" data-turbo-track="reload"></script>
251+
<%= javascript_importmap_tags %>
252+
```
253+
245254
## License
246255

247256
Importmap for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)