Giter VIP home page Giter VIP logo

Comments (6)

jancassio avatar jancassio commented on April 30, 2024

Not sure if this info can be helpful but "babel-plugin-react-transform": "^1.1.1" still working fine, this looks like a problem at version 2.0.0.

from babel-plugin-react-transform.

 avatar commented on April 30, 2024

Can you share the output of npm outdated?

Specifically, are you using babel@6?

from babel-plugin-react-transform.

jancassio avatar jancassio commented on April 30, 2024

Sure thing, there is:

Package       Current  Wanted  Latest  Location
babel-loader    5.4.0   5.4.0   6.2.0  wherever

I'm using [email protected].

from babel-plugin-react-transform.

 avatar commented on April 30, 2024

I suspect that if you upgrade that dependency, this error will go away. The 2.0 release was mainly a rewrite to become compatible with babel@6.

It might make sense for babel@>5 to be added to package.json as a peerDependency of this plugin so that npm at least warns about the incompatibility. I'm not 100% what the impact of peerDeps are in npm@2 though.

from babel-plugin-react-transform.

gaearon avatar gaearon commented on April 30, 2024

From the first line in README:

These docs are for the v2 release using Babel 6, if you are still on Babel 5 then you should use v1.1 instead.

;-)

I'm not sure how peerdeping on babel-loader would work with presets. Namely would presets be forced to also install it with [email protected]? That would be weird. I think we'll avoid peerdep and just refer people to this issue.

from babel-plugin-react-transform.

jancassio avatar jancassio commented on April 30, 2024

Yeah makes sense, right now the babel6.x isn't a big deal so the version v1.1 fits perfectly.

@gaearon since you guys made a whole refactor to make the plugin compatible with Babel 6, I guess is much better to developer webpack config to be compatible with Babel 6 instead to get headache with peer dependencies.

From Babel 6 release post:

When updating your plugins, please remember to bump your major versions since this makes Babel 5 and 6 incompatible. Semver is important!

Thanks guys.

from babel-plugin-react-transform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.