dimanche 21 octobre 2018

Ember app Installing npm dependencies in a host app

I am referring to the below blog link and have a very specific question;

https://simplabs.com/blog/2017/02/13/npm-libs-in-ember-cli.html

I am referring to the section "npm dependencies"

Basically this is a host app trying to use a child addon & it's dependencies ("moment" library shown for example). So if the child addon is defining "moment" as a "dependency" (not "devDependencies"), would the host app not just install "moment" & work fine ?

Why are the additional steps shown for the resolver algorithm needed ? So essentially what is the purpose of the following additional code shown on that page;

var momentTree = new Funnel(path.dirname(require.resolve('moment/moment.js')), {
  files: ['moment.js'],
});




Aucun commentaire:

Enregistrer un commentaire