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

Add an 'ignore' node in the config to prevent compiling certain files/dirs #1

Open
maelanleborgne opened this issue Oct 12, 2023 · 0 comments · May be fixed by #6
Open

Add an 'ignore' node in the config to prevent compiling certain files/dirs #1

maelanleborgne opened this issue Oct 12, 2023 · 0 comments · May be fixed by #6
Labels
enhancement New feature or request

Comments

@maelanleborgne
Copy link
Contributor

maelanleborgne commented Oct 12, 2023

This is a tricky one.
SWC has an '--ignore' option, but it allows only a single path to be excluded (or at least I didn't manage to make it take multiple paths.)
So the solution I found was to pass a config snippet with --config-json (not documented on there website) to override the "exclude" config from .swcrc. This works, but SWC prints an error and exits with a 1 return code, so I had to disable printing the output of the command (which didn't print anything anyway) and apply a test on the error message to check if it's a 'real' error or just a notification that a file has been skipped.

Right now I think it's a very dirty hack, and I don't see any other solution but to ask on the swc repo to be able to bypass this.

If you'd like to give it a try go ahead 😃

@maelanleborgne maelanleborgne added the enhancement New feature or request label Oct 12, 2023
@maelanleborgne maelanleborgne linked a pull request Oct 12, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant