Skip to content

v0.3.0

Choose a tag to compare

@dannote dannote released this 12 Mar 04:43
· 156 commits to master since this release

What's new

transform/3

  • Source maps — OXC.transform(code, file, sourcemap: true) returns %{code: ..., sourcemap: ...} with a v3 source map
  • Target downleveling — OXC.transform(code, file, target: "es2019") lowers syntax features (e.g. nullish coalescing → ternary)
  • JSX import source — OXC.transform(jsx, file, import_source: "vue") uses vue/jsx-runtime instead of react/jsx-runtime
  • JSX factory/fragment — OXC.transform(jsx, file, jsx: :classic, jsx_factory: "h", jsx_fragment: "Fragment")

bundle/2

  • Target downleveling — OXC.bundle(files, target: "es2020")
  • JSX import source — OXC.bundle(files, import_source: "vue")
  • JSX factory/fragment — same options as transform

imports/2

Fast NIF-level import specifier extraction — skips full AST serialization. Type-only imports are excluded automatically.

{:ok, ["vue", "preact"]} = OXC.imports("import { ref } from 'vue'\nimport { h } from 'preact'", "test.ts")