Skip to content

[Feature Request] feature similar to ESLint "overrides" (config based on glob) #5451

@xtuc

Description

@xtuc

Following a discusion from #5420.

It would be usefull to provide an alternative configuration based on the path of the file being transpiled.

In the following example, only the main.js file would be using the add-module-exports plugin. The es2015 presets in used on all files.

{
  presets: ['es2015'],
  files: {
    "./main.js": {
      plugins: ['add-module-exports'],
    },
  }
}

We should also be able to provide globs as path:

{
  presets: ['es2015'],
  files: {
    "./*.js": {
      plugins: ['transform-remove-console'],
    },
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR: New Feature 🚀A type of pull request used for our changelog categoriesoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions