Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discontinue support for CommonJS require() #51

Closed
Tracked by #53
catplvsplus opened this issue May 21, 2024 · 0 comments
Closed
Tracked by #53

Discontinue support for CommonJS require() #51

catplvsplus opened this issue May 21, 2024 · 0 comments

Comments

@catplvsplus
Copy link
Member

In the future major update, support for CommonJS will be dropped and all the packages will be using ES Modules. This means that using require() to import packages will no longer work and will only work for import().

Reasons

  • Discord.js breaks types when importing from cjs and mjs
  • ESM features cannot be utilized because of the support for CJS
  • CJS is old and not the standard for importing packages

Visualization

- const { RecipleClient } = require('@reciple/core');
+ import { RecipleClient } from '@reciple/core';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment