Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitace646f

Browse files
authored
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 theseexamples.Closesgh-5336
1 parenta7fa303 commitace646f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎build/fixtures/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ or, to use the jQuery ECMAScript module:
2323

2424
```html
2525
<scripttype="module">
26-
import { $ }from"https://code.jquery.com/jquery-@VERSION.min.js";
26+
import { $ }from"https://code.jquery.com/jquery-@VERSION.module.min.js";
2727
</script>
2828
```
2929

3030
or:
3131

3232
```html
3333
<scripttype="module">
34-
import {jQuery }from"https://code.jquery.com/jquery-@VERSION.min.js";
34+
import {jQuery }from"https://code.jquery.com/jquery-@VERSION.module.min.js";
3535
</script>
3636
```
3737

3838
All jQuery modules export named`$` &`jQuery` tokens; the further examples will just show`$`. The default import also works:
3939

4040
```html
4141
<scripttype="module">
42-
import $from"https://code.jquery.com/jquery-@VERSION.min.js";
42+
import $from"https://code.jquery.com/jquery-@VERSION.module.min.js";
4343
</script>
4444
```
4545

@@ -55,7 +55,7 @@ or as a module:
5555

5656
```html
5757
<scripttype="module">
58-
import { $ }from"https://code.jquery.com/jquery-@VERSION.slim.min.js";
58+
import { $ }from"https://code.jquery.com/jquery-@VERSION.module.slim.min.js";
5959
</script>
6060
```
6161

@@ -67,8 +67,8 @@ To avoid repeating long import paths that change on each jQuery release, you can
6767
<scripttype="importmap">
6868
{
6969
"imports": {
70-
"jquery":"https://code.jquery.com/jquery-@VERSION.min.js",
71-
"jquery/slim":"https://code.jquery.com/jquery-@VERSION.slim.min.js"
70+
"jquery":"https://code.jquery.com/jquery-@VERSION.module.min.js",
71+
"jquery/slim":"https://code.jquery.com/jquery-@VERSION.module.slim.min.js"
7272
}
7373
}
7474
</script>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp