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:

Simplifying CSS Animations With The `Display` And `Size` Properties

Simplifying CSS animations with the display and size properties

New CSS features simplify animating elements by allowing transitions for display and size properties, reducing the need for complex JavaScript workarounds.

Saleh Mubashar
Oct 24, 2024 ⋅ 7 min read
The Best React Select Component Libraries

The best React select component libraries

Explore select libraries in React, including React Select and alternatives like Downshift, Choice.js, and more.

Jude Miracle
Oct 23, 2024 ⋅ 7 min read

A guide to the best email editing tools

Learn about open-source and free email editors that streamline template creation, and then check out how to test them.

Isaac Okoro
Oct 22, 2024 ⋅ 4 min read
Deep Dive React Fiber

A deep dive into React Fiber

Learn about React Fiber, an internal engine change geared to make React faster and smarter by solving the DOM tree issue.

Karthik Kalyanaraman
Oct 22, 2024 ⋅ 20 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