In the book ember 101 (http://ift.tt/1wDufPW), the author demonstrates importing moment.js through ember-browserify. He says this is necessary because the goal is to install moment.js with npm and that browserify is needed to get moment.js from npm to be runnable in the browser. The import then looks like:
import moment from 'npm:moment';
I don't understand why browserify must be used at all. Ember itself is installed through npm and runs in the browser. What purpose does browserify serve in this example?
Aucun commentaire:
Enregistrer un commentaire