Skip to content

Some modules labeled 'esm' are dual #9

Closed
@joyeecheung

Description

@joyeecheung

First of all, thanks for doing this project, it's very helpful for looking into the ESM situation in the ecosystem!

I am using the data in data/2024-02-20.json to find high impact packages that are ESM-only in order to test my require(esm) implementation & check the performance. Along the way I noticed that some packages labeled esm seem to be actually dual (at least, the can be both required and imported). So far the packages like this that I've found are:

  • tslib
  • fs-extra
  • axios
  • parse5
  • node-releases (this is just a bunch of .json files so can be required or imported with import attributes)
  • ts-node
  • @eslint-community/regexpp
  • babel-plugin-polyfill-regenerator (and other babel plugins too? This is a transpiled file with __esModule)
  • html-escaper
  • @ungap/structured-clone
  • @emotion/hash
  • @emotion/cache
  • @emotion/sheet
  • @emotion/weak-memoize
  • @swc/helpers
  • @floating-ui/dom
  • css-declaration-sorter
  • @floating-ui/core
  • marked
  • redux
    (still continuing my testing by going through the list..)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions