約124件1ページ目

日本語のみで絞り込む

To customize what should be returned by require(esm) directly, the ES Module can export the desired value using the string name "module.exports" .

2025/7/12 -In NodeJS, module.exports is used to share functions, objects, or values from one file to the other file so that other files can use them.

The "exports" provides a modern alternative to "main" allowing multiple entry points to be defined, conditional entry resolution support between environments, ...

2011/8/21 -So module.exports offers more power but can also be used to have your module export atypical values (like a primitive). In contrast exports is ...

2026/10/19 -Exporting and Consuming Modules: The article provides a comprehensive guide on how to create, export, and consume modules in Node.js. It ...

2022/4/25 -Declaring a module.exports object in a file specifies the values to be exported from that file. When exported, another module can import this ...

What is a Module in Node.js? Modules are the building blocks of Node.js applications, allowing you to organize code into logical, reusable components.

2023/10/23 -exports is for CJS modules which are pulled into other code via require . export is for ESM modules, which are pulled in via import .

2018/12/27 -Module exports are the instruction that tells Node.js which bits of code (functions, objects, strings, etc.) to “export” from a given file so ...

5日前 -Every module can have two different types of export, named export and default export. You can have multiple named exports per module but only ...