Skip to content

esm: empty ext from pkg type/main doesnt affect format

BREAKING (kind of a bugfix? unclear)

This ensures files with unknown extensions like extension.unknown are not loaded as CJS/ESM when imported as a main entry point and makes sure that those files would maintain the same format even if loaded after the main entrypoint.

Added tests for importing missing extension and unknown extension after entrypoint along the way.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading