loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.96k stars 1.07k forks source link

ESModule Support #10744

Open achrinza opened 4 days ago

achrinza commented 4 days ago

Packages that need to be updated to support ESModules:

The path to supporting ESModules can be broken down into three stages:

  1. Second-class support for ESModules: Projects should be able to switch over to ESModule by simply setting type: module in package.json
  2. First-class support for ESModules: lb4 commands should detect and generate ESModule artifacts
  3. Default to ESModules: Use ESModules in examples/ and default lb4 app CLI to generating ESModule-based LB4 project

Similar to action-based sequences, we should not drop support for CommonJS entirely, but instead indefinitely deprecate it by the end of stage 3. This means continuing to generate CommonJS @loopback/* packages.