Support Oxc Built-In Transformer Plugins

Open
#891 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
node.js, typescript
Domain
cli, tooling

Research direction

Start by reading the oxnode CLI entry points and how Oxc transformer plugins are currently exposed or configured; the issue names no files or tests. Compare the proposed built-in plugin, CLI option, and config-file approaches, then determine whether one can support styled-components transforms without requiring Vite; done means the supported approach and its behavior are clear.

Written by the indexing model from the issue text.

Description

I currently use vite-node to allow me to transform some styled-components code that requires/benefits from the transformer plugin.

It'd be nice if I could skip the vite dependency (and rolldown etc.) and use oxnode instead. Would it be possible to either:

  1. Enable built-in plugins by default (maybe not safe, and presumably would add overhead for those not needing them).
  2. Add a new CLI command(s) for plugin use (oxnode with-plugins ...), or options to the base command (not sure if we want that potentially conflicting with node).
  3. Add a config file (oxc.config.ts)? Which could maybe also be inherited by vite, rolldown, tsdown etc.?

None of these sound ideal, but thought I'd propose it anyway in case these sound acceptable, or another option exists that I'm not thinking of.

Dominant language
TypeScript
Stars
269
Forks
10
Avg merge
5h 19m
Merged PRs (30d)
75

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from oxc-project/oxc-node

All issues in oxc-project/oxc-node

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.