GithubHelp home page GithubHelp logo

Comments (20)

Couto avatar Couto commented on July 16, 2024

oh thank god! :)

I'm in lazy mode, since is kinda late already here... so sorry for asking this, but what's the best approach? Just move peerDependencies to regular dependencies?

from babel-loader.

necolas avatar necolas commented on July 16, 2024

Yes I think you can make babel-core a dependency and drop webpack (which doesn't seem to be used by your tests either).

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

I don't see anywhere in that issue that they are going to be removed. The issue says their behavior will change (no longer automatically installing).

from babel-loader.

necolas avatar necolas commented on July 16, 2024

I didn't say it would be removed :). But babel-core shouldn't be a peerDependency as well as a dependency.

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

Why not? It's a way to specify compatibility.

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

If babel-core was moved to dependencies it'd be more complicated to pick specific Babel builds from your app's package.json. Being able to pick a specific build is important for tool like Babel that has large impact on your code.

from babel-loader.

necolas avatar necolas commented on July 16, 2024

Well it's already in the dependencies https://github.com/babel/babel-loader/blob/master/package.json#L7

from babel-loader.

Couto avatar Couto commented on July 16, 2024

It's in the dependencies for consistency with other babel utilities like grunt-babel and gulp-babel

In my opinion babel-core should live in the peer dependencies without requesting a specific version (*) so that users can pick their favorite version, however I'll do like others do to avoid confusion inside the babel's ecosystem.

I'm going, eventually, to remove the current peer dependencies in the next versions.

from babel-loader.

necolas avatar necolas commented on July 16, 2024

Yeah it's tricky, because I agree with gaearon's point (and had similar complaints with jscs-loader). Hah, perhaps peerDependencies is the way to go after all in this case.

from babel-loader.

jhnns avatar jhnns commented on July 16, 2024

The current README is misleading because peerDependencies are not deprecated. Auto-installing is deprecated.

And I can confirm @gaearon concerns: It should stay as peerDependencies. I've experienced similar issues with the less- and sass-loader.

from babel-loader.

Couto avatar Couto commented on July 16, 2024

I agree :)

However I can't really fix it right now (or today) if you're up for a PR that should be faster!

from babel-loader.

SpaceK33z avatar SpaceK33z commented on July 16, 2024

Is it intended behavior that babel-core now is installed twice in npm 2+? Once as peer dependency and once as normal dependency of babel-loader. babel-core is 21mb...

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

I don't think it's intended behavior. Delete both, set most recent versions in package.json and run npm install again?

from babel-loader.

SpaceK33z avatar SpaceK33z commented on July 16, 2024

That changes nothing, which makes sense, because if you look in the package.json of this package, you will see that babel-core is defined twice as a dependency.

Edit: three times even.

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

@SpaceK33z lol, you're right! I don't know why.

@sairion Any idea why it's both a peer, a regular, and a dev dep?

from babel-loader.

Couto avatar Couto commented on July 16, 2024

Actually, for no special reason other than it was left forgotten.

A PR is more than welcome, and I'll try to merge as soon as possible, since I am on mobile!

On August 10, 2015 12:30:24 PM GMT+01:00, Dan Abramov [email protected] wrote:

@SpaceK33z lol, you're right! I don't know why.

@sairion Any idea why it's both a peer, a regular, and a dev dep?


Reply to this email directly or view it on GitHub:
#47 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

from babel-loader.

SpaceK33z avatar SpaceK33z commented on July 16, 2024

In #94 I've deleted the peer and dev dependency. This would the most consistent option, right? gulp-babel and grunt-babel also only have babel-core as dependency.

from babel-loader.

tomasdev avatar tomasdev commented on July 16, 2024

Hey guys

I'm getting

± npm install --save babel-loader
npm WARN peerDependencies The peer dependency babel-core@^5.0.0 included from babel-loader will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency 
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--save" "babel-loader"
npm ERR! node v0.12.4
npm ERR! npm  v2.10.1
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package babel-core does not satisfy its siblings' peerDependencies requirements!

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tomas/WORK/Events/events-v2/npm-debug.log

But there's no "xxx@version wants yyy@version" in the npm-debug.log file — Any clue if this might be related to that?

from babel-loader.

gaearon avatar gaearon commented on July 16, 2024

@tomasdev

You probably already have [email protected] and are trying to install [email protected]. They are incompatible. Stay on 5.x for everything until support comes.

from babel-loader.

joshwiens avatar joshwiens commented on July 16, 2024

For reference - peerDependencies these days are used to convey supported versions of a library where multiple versions can be used. In this case, webpack1.x || 2.xwhich has been removed as adevDependency` bable-core and the es2015 preset are moving into devDeps.

from babel-loader.

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.