Skip to content

Commit 04dec4a

Browse files
committed
.mjs拡張子を用いる方法からpackage.json"type": "module"と書く方法に変更
1 parent 27d5138 commit 04dec4a

File tree

70 files changed

+103
-79
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+103
-79
lines changed

docs/3-web-servers/03-node-js/index.mdx

Lines changed: 3 additions & 3 deletions
-24 KB

docs/3-web-servers/04-module/_samples/date-fns/main.mjs renamed to docs/3-web-servers/04-module/_samples/date-fns/main.js

File renamed without changes.

docs/3-web-servers/04-module/_samples/date-fns/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "date-fns",
3+
"type": "module",
34
"dependencies": {
45
"date-fns": "^4.1.0"
56
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import add from "./sub.js";
2+
console.log(add(3, 4));

docs/3-web-servers/04-module/_samples/default-export/main.mjs

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/3-web-servers/04-module/_samples/default-export/sub.mjs renamed to docs/3-web-servers/04-module/_samples/default-export/sub.js

File renamed without changes.
File renamed without changes.

docs/3-web-servers/04-module/_samples/mathjs/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "mathjs",
3+
"type": "module",
34
"dependencies": {
45
"mathjs": "^14.5.3"
56
}

docs/3-web-servers/04-module/_samples/named-export/main.mjs renamed to docs/3-web-servers/04-module/_samples/named-export/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { add, subtract } from "./sub.mjs";
1+
import { add, subtract } from "./sub.js";
22
console.log(add(3, 4));
33
console.log(subtract(4, 3));

0 commit comments

Comments
 (0)