© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Manh Do
Programming
Great article. How can I import a package which only publish their code as esm without having to set type: "module" in my package.json?
pranshu shah
frontend-engineer
I think you can use .mjs extension to tell JavaScript engine that this file is ESM module not a script file. but I think setting type: module in package.json is better option
.mjs
type: module