Webpack dependencies between bower and npm not working
BraunreutherA opened this issue · comments
When using webpack as bundle manager and using famo.us I get follwing error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module main due to:
Error: [$injector:modulerr] Failed to instantiate module main.core due to:
Error: [$injector:modulerr] Failed to instantiate module famous.angular due to:
ReferenceError: famous is not defined
I think that's because the dependency resolving between bower and npm doesn't work.
With browserify it's solved in the package.json with then shim depends module. I was searching how this works with webpack but couldn't find out.
is famous coming from bower or npm ?
famous-angular is coming from bower and famous from npm
try this just before the require('famous-angular')
:
window.famous = require('famous');
That works - Thank you! :)
Is there a solution like with browserify? Would be more elegant but as long as it works its okay.
u're welcome
nope from what i know webpack does not do dependencies, you have to be explicit with requires