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

[FR]: Support setting a default file extension #252

Open
Aghassi opened this issue Apr 10, 2024 · 1 comment
Open

[FR]: Support setting a default file extension #252

Aghassi opened this issue Apr 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request untriaged Requires traige

Comments

@Aghassi
Copy link

Aghassi commented Apr 10, 2024

What is the current behavior?

Currently rules_swc defaults to js unless you have file types mts, mjs, cts, cjs. This means that you can't customize the file extension type out easily without doing a bunch of list comprehension. There are cases where you may not have individual files, so having the ability to just ask the rule to produce a different extension would be nice.

Describe the feature

Support passing something like


        default_ext = ".cjs",

to the swc_compile rule such that it renames all the files created on your behalf without the need for js_outs

We wrote a patch for this internally and would happily contrib it upstream if the maintainers are open to it.

@Aghassi Aghassi added the enhancement New feature or request label Apr 10, 2024
@github-actions github-actions bot added the untriaged Requires traige label Apr 10, 2024
@alexeagle
Copy link
Member

Sorry for no reply here @Aghassi - sure I'm open to that change, it doesn't add to the complexity of implementation and is simple to document.

Aghassi pushed a commit to Aghassi/rules_swc that referenced this issue Nov 16, 2024
Aghassi pushed a commit to Aghassi/rules_swc that referenced this issue Nov 16, 2024
Aghassi pushed a commit to Aghassi/rules_swc that referenced this issue Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

2 participants