loopbackio / loopbackio/loopback-next
ESModule Support
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by mapping the listed @loopback/boot, @loopback/build, @loopback/cli, and examples/* packages against the three ESModule support stages. Read how package.json type settings and lb4 artifact generation currently work, then define completion against the stage being addressed while preserving generated CommonJS @loopback packages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- build-system, cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100