Migrate to ESM#370
Merged
Merged
Conversation
Deploying with
|
| Latest commit: |
59eaac6
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a9eb5f2d.utcode-learn.pages.dev |
| Branch Preview URL: | https://migrate-to-esm.utcode-learn.pages.dev |
|
|
||
| さきほどのように `export` 文と `import` 文を用いて他の<Term type="javascriptModule">モジュール</Term>とのやり取りを行う JavaScript 標準の<Term type="javascriptModule">モジュール</Term>システムを、[**ECMAScript モジュール**](https://developer.mozilla.org/ja/docs/Web/JavaScript/Guide/Modules)と呼ぶ場合があります。Node.jsでは、拡張子を `.mjs` にすることで、ECMAScript <Term type="javascriptModule">モジュール</Term>を用いてプログラムを記述できます。 | ||
|
|
||
| 逆に、`exports` オブジェクトや `require` 関数を使った<Term type="javascriptModule">モジュール</Term>システムを、[CommonJS モジュール](https://nodejs.org/api/modules.html)と呼ぶ場合があります。Node.js では、拡張子を `.js` にすることで、ECMAScript <Term type="javascriptModule">モジュール</Term>を用いてプログラムを記述できます。 |
Contributor
There was a problem hiding this comment.
多分いきなり exports と require が出てくると混乱しそうなので、「ECMAScript モジュール以外のモジュールシステム としては、CommonJS モジュール があります。CommonJS モジュールでは、プログラム中で exports というオブジェクトが利用できます...」みたいな感じがいいと思う
kazukinumazato
approved these changes
Sep 25, 2023
Contributor
Author
|
GoGo!!! |
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Node.jsをESMに完全に移行しました。演習問題集は、移行できていません。