orionjs / orioncms

[Old] Orion is an open source framework built on Meteor that makes complex as well as simple apps possible with minimal effort.
http://orionjs.org
MIT License
715 stars 129 forks source link

orion with webpack: "ecmascript and webpack:webpack are both trying to handle *.js" #378

Open vonwao opened 8 years ago

vonwao commented 8 years ago

I don't understand why, but when I add orion:core within a project using webpack, I get this error:

=> Errors prevented startup:                  

   While determining active plugins:
   error: conflict: two packages included in the app (ecmascript and webpack:webpack) are both trying to handle *.js

Webpack allows to use ES6 modules, and I'm using React for my front end UI, so it lets me use NPM modules for react.

lusilva commented 8 years ago

I'm having the same problem, think this is because orionjs:core relies on orionjs:base, which has ecmascript as a dependency.

Is there a way to locally install orionjs:core and remove the ecmascript dependency from orionjs:base, having everything else work? That way the webpack plugin can handle the *.js files.

dpacmittal commented 8 years ago

+1. Having the same issue. Did anyone figure solution/workaround for this?

lusilva commented 8 years ago

Only way I got around it was downloading the package locally and removing the ecmascript dependency. With web pack's growing popularity, it might be worth it for them to make the two compatible.

I think if the package is only "use"ing ecmascript, it should not affect the app that's using webpack. Because "use"ing a package in a package does not expose that package being used to the app. The issue is that orion "imply"ies ecmascript, which breaks webpack.