diff options
author | Michał Gołębiowski-Owczarek <m.goleb@gmail.com> | 2023-09-22 01:39:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-22 01:39:05 +0200 |
commit | ace646f6e83e653f666ba715c200739f1cbdba52 (patch) | |
tree | a90181b7e0326b04d1bd3666d2b640c6bb697459 /build | |
parent | a7fa303fda11ad298875676ffff78143cc49ce95 (diff) | |
download | jquery-ace646f6e83e653f666ba715c200739f1cbdba52.tar.gz jquery-ace646f6e83e653f666ba715c200739f1cbdba52.zip |
Docs: Fix module links in the package README
The package README used to show examples importing from a regular jQuery file;
this won't work natively. Instead, use module versions of jQuery in these
examples.
Closes gh-5336
Diffstat (limited to 'build')
-rw-r--r-- | build/fixtures/README.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/build/fixtures/README.md b/build/fixtures/README.md index b64c9bca5..9e9bf7169 100644 --- a/build/fixtures/README.md +++ b/build/fixtures/README.md @@ -23,7 +23,7 @@ or, to use the jQuery ECMAScript module: ```html <script type="module"> - import { $ } from "https://code.jquery.com/jquery-@VERSION.min.js"; + import { $ } from "https://code.jquery.com/jquery-@VERSION.module.min.js"; </script> ``` @@ -31,7 +31,7 @@ or: ```html <script type="module"> - import { jQuery } from "https://code.jquery.com/jquery-@VERSION.min.js"; + import { jQuery } from "https://code.jquery.com/jquery-@VERSION.module.min.js"; </script> ``` @@ -39,7 +39,7 @@ All jQuery modules export named `$` & `jQuery` tokens; the further examples will ```html <script type="module"> - import $ from "https://code.jquery.com/jquery-@VERSION.min.js"; + import $ from "https://code.jquery.com/jquery-@VERSION.module.min.js"; </script> ``` @@ -55,7 +55,7 @@ or as a module: ```html <script type="module"> - import { $ } from "https://code.jquery.com/jquery-@VERSION.slim.min.js"; + import { $ } from "https://code.jquery.com/jquery-@VERSION.module.slim.min.js"; </script> ``` @@ -67,8 +67,8 @@ To avoid repeating long import paths that change on each jQuery release, you can <script type="importmap"> { "imports": { - "jquery": "https://code.jquery.com/jquery-@VERSION.min.js", - "jquery/slim": "https://code.jquery.com/jquery-@VERSION.slim.min.js" + "jquery": "https://code.jquery.com/jquery-@VERSION.module.min.js", + "jquery/slim": "https://code.jquery.com/jquery-@VERSION.module.slim.min.js" } } </script> |