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

@oxc-project/runtime NPM package #7422

Open
overlookmotel opened this issue Nov 22, 2024 · 1 comment
Open

@oxc-project/runtime NPM package #7422

overlookmotel opened this issue Nov 22, 2024 · 1 comment
Assignees
Labels
A-transformer Area - Transformer / Transpiler P-high Priority - High

Comments

@overlookmotel
Copy link
Contributor

We currently use @babel/runtime for helper functions used in transformer.

Should we publish our own @oxc-project/runtime NPM package and use that instead?

Initially, it could just re-export from @babel/runtime, but I can see various advantages of having our own package:

  1. @babel/runtime may be updated and break our transforms at any time. We can lock the version of @babel/runtime used in @oxc-project/runtime to prevent that.
  2. We have decided to diverge from Babel where we can produce better output, or need to do things differently because Rust. We may want to alter some of the helpers too.
  3. We only use a fraction of the helpers because we're only supporting transform down to ES6. Our package can be much smaller than @babel/runtime.
  4. It's just weird to tell users to install @babel/runtime as a dependency in their project to use Oxc.
@overlookmotel overlookmotel added the A-transformer Area - Transformer / Transpiler label Nov 22, 2024
@overlookmotel overlookmotel changed the title oxc-runtime NPM package @oxc-project/runtime NPM package Nov 22, 2024
@Boshen Boshen added this to the Transformer Milestone 2 milestone Nov 25, 2024
@Boshen Boshen self-assigned this Nov 25, 2024
@Boshen
Copy link
Member

Boshen commented Nov 26, 2024

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@babel/runtime' imported from ...

@Boshen Boshen added the P-high Priority - High label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler P-high Priority - High
Projects
None yet
Development

No branches or pull requests

2 participants