-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add how to support legacy browsers to README
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
<script async src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" data-turbo-track="reload"></script> | ||
<%= javascript_importmap_tags %> | ||
``` | ||
|
||
## License | ||
|
||
Importmap for Rails is released under the [MIT License](https://opensource.org/licenses/MIT). |