Skip to content

Specifying a different file (different filename, same file type) for config other than .babelrc #4970

@ORESoftware

Description

@ORESoftware

I was looking through the Babel docs, and I don't see a way to specify a different file other than .babelrc for the Babel config.

My use case is I am writing a test runner. A project might use Babel in more than one way. For example, they may transpile their source with some Babel settings, but may transpile their tests with another Babel setting.

So ideally, what I would have in the project root, would be:

project-root/
  .babelrc          // used by project source 
   suman.babelrc     // used for transpiling tests

my thinking is that when I use babel-cli, I could pass the path to suman.babelrc to babel via the command line, or an env variable, either one.

Is this supported yet? Like I said, had trouble finding out if this is supported. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions