✨import ES module
🚧 under construction
Last updated
Was this helpful?
🚧 under construction
Last updated
Was this helpful?
Was this helpful?
JS ⟩ module ⟩ ES ⟩ import ⟩ example ⟩ import ES module
import modules from npm (Node Package Manager).
replit:import ES modules
// ⭐️ To use this file as an ES module,
// add this line to "package.json".
// -----------------------------------------------------------------
//
// "type": "module",
//
// -----------------------------------------------------------------
// import {days as dayNames} from "date-names";
// ^^^^
// -----------------------------------------------------------------
// ⛔ SyntaxError: Named export 'days' not found.
// -----------------------------------------------------------------