2024-06-06
1982
#node
Kingsley Ubah
84746
Jun 6, 2024 ⋅ 7 min read

CommonJS vs. ES modules in Node.js

Kingsley Ubah 21. Web Developer. Technical Writer. African in Tech.

Recent posts:

debugging javascript web apps

How to master JavaScript debugging for web apps

With the right tools and strategies, JavaScript debugging can become much easier. Explore eight strategies for effective JavaScript debugging, including source maps and other techniques using Chrome DevTools.

Ivy Walobwa
Jan 9, 2025 ⋅ 8 min read
A Deep Dive Into Angular’s FormArray Container

A deep dive into Angular’s FormArray container

This Angular guide demonstrates how to create a pseudo-spreadsheet application with reactive forms using the `FormArray` container.

Kayode Adeniyi
Jan 8, 2025 ⋅ 3 min read
Handling React Loading States With React Loading Skeleton

Handling React loading states with React Loading Skeleton

Implement a loading state, or loading skeleton, in React with and without external dependencies like the React Loading Skeleton package.

Ibadehin Mojeed
Jan 7, 2025 ⋅ 7 min read
Getting Ready For Tailwind V4.0

Getting ready for Tailwind v4.0

The beta version of Tailwind CSS v4.0 was released a few months ago. Explore the new developments and how Tailwind makes the build process faster and simpler.

Oscar Jite-Orimiono
Jan 6, 2025 ⋅ 12 min read
View all posts

5 Replies to "CommonJS vs. ES modules in Node.js"

  1. You are able to dynamically import es modules. You can for example out them inside an If statement, it just returns a promise.

  2. how can I import this in ES module

    var session = require(“express-session”);
    var FileStore = require(“session-file-store”)(session);

Leave a Reply