-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use es module shims in docs for Safari/Firefox compatibility (#105)
* add es module shims * Enable json modules with shim * Set options before shims * Remove comment from importmap json
- Loading branch information
Showing
2 changed files
with
17 additions
and
5 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 |
---|---|---|
|
@@ -5,6 +5,10 @@ | |
<title>Tailwind Stimulus Components</title> | ||
<link href="https://unpkg.com/[email protected]/dist/tailwind.min.css" rel="stylesheet"> | ||
<link href="https://unpkg.com/@tailwindcss/[email protected]/dist/forms.min.css" rel="stylesheet"> | ||
<script> | ||
window.esmsInitOptions = { enable: ['css-modules', 'json-modules'] } | ||
</script> | ||
<script async src="https://unpkg.com/es-module-shims/dist/es-module-shims.js"></script> | ||
<body> | ||
<div class="container mx-auto p-8"> | ||
<h1 class="text-3xl font-semibold mb-2">Tailwind Stimulus Components Alert Examples</h1> | ||
|
@@ -62,11 +66,13 @@ <h1 class="text-3xl font-semibold mb-2">Tailwind Stimulus Components Alert Examp | |
"imports": { | ||
"@hotwired/stimulus": "https://unpkg.com/@hotwired/stimulus/dist/stimulus.js", | ||
"tailwindcss-stimulus-components": "https://unpkg.com/tailwindcss-stimulus-components/dist/tailwindcss-stimulus-components.modern.js" | ||
// Uncomment to use local package with "npx serve" | ||
//"tailwindcss-stimulus-components": "../dist/tailwindcss-stimulus-components.modern.js" | ||
} | ||
} | ||
</script> | ||
<!-- | ||
Use the following importmap for local package with "npx serve" | ||
"tailwindcss-stimulus-components": "../dist/tailwindcss-stimulus-components.modern.js" | ||
--> | ||
|
||
<script type="module"> | ||
import { Application } from "@hotwired/stimulus" | ||
|
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