Skip to content

If CJS is no longer supported, it would be nice to mention in README #1976

@mildsunrise

Description

@mildsunrise

Hi! Apologies if there was already an issue for this, I didn't find any.
Just found out Got only provides an ESM version, but no CJS version, which makes it incompatible with CommonJS projects.
After digging through this repo I found a Gist from sindersorhus confirming that the package did indeed remove support for CommonJS.

A Gist is nice, but a lack of support like this should IMHO be mentioned clearly in the README as it can be frustrating to users (especially newbies).

Something like this before the 'Install' section would be nice:

Warning: This package no longer provides a CJS module. If your project uses CommonJS, you'll have to convert to ESM, or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

WDYT?

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