Skip to content

Modify babel config as part of our plugin on file base #15084

Answered by JLHwung
fkrauthan asked this question in Q&A
Discussion options

You must be logged in to vote

A plugin could manipulate Babel options by manipulateOptions(), but it could do so only at the config resolving phase. At the time when Babel is processing the input source, the config can no longer be mutated.

cover everything based on include and exclude patterns and based on filenames

Yes. And you can read all sources, check certain strings, and programmatically generate input and exclude for babel.config.js.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@fkrauthan
Comment options

@JLHwung
Comment options

@fkrauthan
Comment options

Answer selected by liuxingbaoyu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants