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

feat: add useAtYourOwnRisk_mutateSwcOptions option #255

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ArnaudBarre
Copy link
Member

@ArnaudBarre ArnaudBarre commented Jan 11, 2025

For a long time I asked people to do a patch to get access to feature I don't want to maintain (hello not yet stable decorators)

I think this option will create less issues/PRs while still having the benefit that users know they are in a non standard setup.

@patak-dev
Copy link
Member

I think in the same way that we allow editing other low level options, we could also directly add a swcOptions config field and add the "use at your own risk" in the docs (and JSDoc). And it could be a merge like with rollupOptions. But if you think this will cause issues down the road, I'm ok with this PR (maybe renaming to useAtYourOwnRiskSwcOptions)

@ArnaudBarre
Copy link
Member Author

I choose the mutate API because I don't want to have to deal with merging, it's always complex to have a good default for arrays. I can change the api to a version where you return the object, but mutating feels simpler (see the example) and it's always safe because all options a generated on every request
Having "use at your risk" only in the docs would be too easy to use IMO, I want people to remember when they read their vite config that they are using unstable decorator transform.

@patak-dev
Copy link
Member

Sounds good to me. The edit is a bit confusing to me. Maybe useAtYourOwnRisk_mutateSwcOptions

Copy link
Collaborator

@hi-ogawa hi-ogawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming bike-shed aside, looks good to me.

@ArnaudBarre ArnaudBarre changed the title feat: add useAtYourOwnRiskEditConfig option feat: add useAtYourOwnRisk_mutateSwcOptions option Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants