loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

ESModule Support

Open achrinza opened this issue 1 year ago • 2 comments

Packages that need to be updated to support ESModules:

  • @loopback/boot
  • @loopback/build
  • @loopback/cli
  • examples/*

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.

achrinza avatar Nov 17 '24 12:11 achrinza

Hello, any idea when this will be available ?

CedBadarou avatar Mar 20 '25 10:03 CedBadarou

Hello, is there any news on getting ESM supported with Loopback? It would be really great especially for monorepos. (As it currently requires some sort of an hybrid configuration, and it's really not straightforward)

Kayoshi-dev avatar Oct 16 '25 15:10 Kayoshi-dev