standard-things / esm

Tomorrow's ECMAScript modules today!
Other
5.26k stars 147 forks source link

How to use dedefault option? #885

Open alexkuc opened 3 years ago

alexkuc commented 3 years ago

Hi!

Documentation mentions cjs: { "dedefault": false } option. What is the purpose of it?

I couldn't quite figure out what A boolean for requiring ES modules without the dangling require().default. means.

I thought it was to get rid of .default for default exports but if I set the option to true, default exports still require .default.

Am I doing something wrong or is dedefault meant for something else?