You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I guess this will solve on the long run that ESM would maybe start working with a higher rate then CJS.
What is the feature you are proposing to solve the problem?
package.json when nothing got set should default to module. not commonjs
What alternatives have you considered?
Loaders, Loader Hooks, Import Require Flags,
The legendary npm:esm@latest package which implements the whole ESM logic in userland over require.
Addition for reactions on this topic
thumbs down and up do mean a LGTM +1 if you do not supply any additions as the fact that you simply care about it shows me we are on the right track.
Compat matrix
import() will fail when loading a .js file that uses require without that it exists in a place where a package json type commonjs is near.
import will work if i create a require on globalThis
What is the problem this feature will solve?
I guess this will solve on the long run that ESM would maybe start working with a higher rate then CJS.
What is the feature you are proposing to solve the problem?
package.json when nothing got set should default to module. not commonjs
What alternatives have you considered?
Loaders, Loader Hooks, Import Require Flags,
The legendary npm:esm@latest package which implements the whole ESM logic in userland over require.
Addition for reactions on this topic
thumbs down and up do mean a LGTM +1 if you do not supply any additions as the fact that you simply care about it shows me we are on the right track.
Compat matrix
import() will fail when loading a .js file that uses require without that it exists in a place where a package json type commonjs is near.
import will work if i create a require on globalThis
in any other case import will work as it is ESM.
Additional context
The text was updated successfully, but these errors were encountered: