Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
feuerherz3639248di used to just put type module in package.json. Think you have to change all imports then though to use the other Syntax. Or us .mjs files.
-
kiki35333248dyou don't. Add "type": "module" to your package.json and forget about cjs for good. cjs is a legacy thing that was needed while ECMAScript standard still had no imports. It has them now. ES Modules work in browsers without webpack or other garbage. It's the standard now, works everywhere including node, deno and bun
-
ars14075248dJust GPT it
It is usually really good at these kind of things, as long as you double check the solution -
@ojt-rant but flacidDev and his 8 loyal follows (or clone accounts so he can feel better about himself) continue to claim iTs PoSsIBLe
again (though a rare occassion), I agree with kiki
Related Rants
day 2 of still not knowing how to mix ES modules with commonjs on a node project
rant
es
js
🤡
node
javascript
bigbrain
lol