swc icon indicating copy to clipboard operation
swc copied to clipboard

[v2] Refactor configuration API

Open kdy1 opened this issue 3 years ago • 6 comments

Context:

https://github.com/swc-project/swc/issues/5720#issuecomment-1236054505

I think something like starlark, which has well-defined semantics, would be much better for users.

Tasks

  • [ ] Remove support for arrays in .swcrc
  • [ ] Determine configurations to remove
  • [ ] Investigate configuration languages like starlark

cc @kwonoj

kdy1 avatar Sep 03 '22 05:09 kdy1

@kwonoj Are you going to provide alternative if you remove support for arrays in your next release

samrat41 avatar May 18 '23 22:05 samrat41

Remove support for arrays in .swcrc

This never worked correctly, so no at this moment until we have proper RFC to satisfy most of usecases.

kwonoj avatar May 18 '23 22:05 kwonoj

@kwonoj Is there any way I can use multiple parsers in swc config then?

samrat41 avatar May 18 '23 22:05 samrat41

Use different config file, or use different config object per calling transform API.

Please do not use this meta issue for asking individual questions.

kwonoj avatar May 18 '23 22:05 kwonoj

So any plans to add "extends" ? Will be super useful with monorepos though!

SwapnilSoni1999 avatar Oct 11 '25 15:10 SwapnilSoni1999

I like the idea of extends. @swc-project/core Any thoughts?

kdy1 avatar Oct 12 '25 12:10 kdy1