Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Backward compatibility to support CommonJS #566

Closed
mastepanoski opened this issue Oct 18, 2022 · 1 comment
Closed

Backward compatibility to support CommonJS #566

mastepanoski opened this issue Oct 18, 2022 · 1 comment

Comments

@mastepanoski
Copy link

Description

Currently if I want to use this module in a project that has not implemented ESM support yet, I get the following error: Error [ERR_REQUIRE_ESM]: require() of ES Module ...someprj/node_modules/@keycloak/keycloak-admin-client/lib/index.js

So tsconfig.json and package.json could be modified to support ESM and CommonJS.

Discussion

No response

Motivation

It would be good to provide backward compatibility to commonjs projects until ESM is widely adopted.

Details

Implementation ideas: Using a hybrid approach https://www.sensedeep.com/blog/posts/2021/how-to-create-single-source-npm-module.html

@jonkoops
Copy link
Contributor

Duplicate of #523

@jonkoops jonkoops marked this as a duplicate of #523 Oct 19, 2022
@jonkoops jonkoops closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants