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

Allow plugins/presets with explicit name #42

Closed
ghost opened this issue Oct 29, 2016 · 0 comments
Closed

Allow plugins/presets with explicit name #42

ghost opened this issue Oct 29, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 29, 2016

Some of the plugins don't follow the babel-plugin-${name} convention, which as result cannot be included, because babel-brunch is always adding the bable-plugin- prefix to the name here: https://github.com/babel/babel-brunch/blob/master/index.js#L36

We should somehow let the consumer specify, if the name should be used as is, or not.
My idea is to use a simple ! at the end of the plugin / preset -name

for example

plugins: {
    babel: {
      ignore: [/web\/static\/vendor/],
      presets: ['es2015', 'es2016', 'react'],
      plugins: [
         "transform-object-rest-spread", // this will resolve babel-plugin-transform-object-rest-spread
         "babel-root-import!", {                 // this will resolve babel-root-import because of `!` at the end
             "rootPathSuffix": "src/js"
         }]
    }
@ghost ghost changed the title Allow plugins with explicit name Allow plugins/presets with explicit name Oct 29, 2016
@ghost ghost closed this as completed Oct 29, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants