Next.js starter your AI actually understands. Ship internal tools in days not weeks. Pre-order $199 $499 → [Get it now]

How to use CommonJS modules in Node.js

Organizing Node.js code into reusable modules is fundamental for building maintainable applications, and understanding the module system is crucial for every Node.js developer. With 10 years of experience in Node.js development since 2014 and as the creator of CoreUI, I’ve built countless server-side applications and npm packages using module systems. From my expertise, CommonJS remains the traditional and widely-supported module format in Node.js, using require() to import and module.exports to export functionality. This approach is synchronous, battle-tested, and compatible with the vast majority of npm packages in the ecosystem.

Read More…

How to import and export modules in Angular

Importing and exporting modules in Angular enables modular application architecture by allowing you to organize features into separate modules and share functionality across the application. As the creator of CoreUI, a widely used open-source UI library, I’ve structured countless Angular applications using proper module imports and exports for scalable enterprise solutions. From my expertise, the most effective approach is using imports array for dependencies and exports array for sharing components with other modules. This method provides clear module boundaries and efficient dependency management.

Read More…
Subscribe to our newsletter
Get early information about new products, product updates and blog posts.
The Wacky World of JavaScript: Unraveling the Oddities
The Wacky World of JavaScript: Unraveling the Oddities

How to limit items in a .map loop in JavaScript
How to limit items in a .map loop in JavaScript

Understanding the Difference Between NPX and NPM
Understanding the Difference Between NPX and NPM

How to Open Link in a New Tab in HTML?
How to Open Link in a New Tab in HTML?

Answers by CoreUI Core Team