babel-plugin-transform-decorators-legacy icon indicating copy to clipboard operation
babel-plugin-transform-decorators-legacy copied to clipboard

Not playing well with other plugins

Open derekr opened this issue 8 years ago • 1 comments

https://github.com/derekr/decorator-legacy-plugins-bug

Plugin order seems to affect other plugins, but not sure what the root cause is. Admittedly not too familiar w/ how babel plugins are run/work, but wondering if I'm overlooking something obvious.

If I run each plugin in isolation they work as expected.

Decorators work, but root-import doesn't.

{
  "presets": [
      "next/babel"
    ],
  "plugins": [
    [
      "transform-decorators-legacy",
      "babel-root-import"
    ]
  ]
}

screen shot 2017-05-25 at 11 08 21 pm

root-import works, but decorators throw syntax error

{
  "presets": [
      "next/babel"
    ],
  "plugins": [
    [
      "babel-root-import",
      "transform-decorators-legacy"
    ]
  ]
}

screen shot 2017-05-25 at 11 07 46 pm

derekr avatar May 26 '17 06:05 derekr

Nevermind this is my tired eyes missing the nested array in the plugins definition -_-

derekr avatar May 26 '17 06:05 derekr