Додати до Chrome
✅ Перевірена відповідь на це питання доступна нижче. Наші рішення, перевірені спільнотою, допомагають краще зрозуміти матеріал.
How to indicate to Node.js that we are creating an ES module?
Give the file a .js extension.
Add a "type" field with the value "ESM" in the package.json file.
Add a "type" field with the value "module" in the package.json file.
Add a "module" field with the value "ESM" in the package.json file.
Give the file a .cjs extension.
Give the file a .mjs extension.
Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!