-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
PR: New Feature 🚀A type of pull request used for our changelog categoriesA type of pull request used for our changelog categoriesoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
The only place I saw "I'd like to use JavaScript inside .babelrc is here: #4449, so I am opening a proper issue about .babelrc.js.
Expected Behavior
I would like to be able to provide:
.babelrc.js
module.exports = {
plugins: [
["babel-plugin-transform-cool", {
isCool: maybe => maybe ? 'yes' : 'no';
}]
]
};And use the isCool option in the plugin like so: state.opts.isCool(true);
Current Behavior
.babelrc only allows for JSON.
Possible Solution
Use babel-core programmatically, this allows for any type of option (which may be seen as non-consistent with .babelrc).
Context
ESLint allows this, I find it easier to reason about configuration files when they are written with JavaScript: comments, easy customization with ENV variables, no context switch (This is JavaScript).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PR: New Feature 🚀A type of pull request used for our changelog categoriesA type of pull request used for our changelog categoriesoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue