babel / babel-brunch

Brunch plugin for Babel
ISC License
69 stars 38 forks source link

.babelrc is ignored #61

Closed webdif closed 6 years ago

webdif commented 6 years ago

I have this exact same issue posted here #52. But it should have been fixed in #53.

My versions: brunch v2.10.10 babel-brunch v6.1.1

My .babelrc:

{
  "presets": ["env", "react"],
  "plugins": [
    "transform-class-properties",
    "transform-object-rest-spread",
    "glamorous-displayname"
  ]
}

The error message: Missing class properties transform.

If I add this in brunch-config.coffee, it works:

exports.config =
  plugins:
    babel:
      presets: [
        'env'
        'react'
      ]
      plugins: [
        'transform-class-properties'
        'transform-object-rest-spread'
        'glamorous-displayname'
      ]

Am I missing something? 😭 If I delete the content of .babelrc, I got Unexpected EOF so the file is read…

Thanks in advance for your help!

webdif commented 6 years ago

After one hour of search, I gave up and create an issue asking for help… and just after posted it, I figured out 🙃

Changeing my package.json from "^6.1.1" to "https://github.com/babel/babel-brunch" resolve my bug. Seems like the #53 fix is not published yet. @paulmillr any chance this will be published soon? 🙂

I close my issue, sorry for the noise. But maybe it will not be for nothing and this will help someone.