angular2.js vs angular2.dev.js

前端 未结 3 1152
天命终不由人
天命终不由人 2021-01-17 18:47

I was wondering about the differences between angular2.js and angular2.dev.js, of course there are more files like: router.dev.js and

相关标签:
3条回答
  • 2021-01-17 19:20

    So as per @Bonneville's useful link the pattern would be, during development as "SystemJS loader user", to reference from the index.html the dev scripts:

    • node_modules/angular2/angular2.dev.js,
    • node_modules/angular2/router.dev.js and
    • node_modules/angular2/http.dev.js

    and then for production to swap in the minified scripts:

    • node_modules/angular2/angular2.min.js,
    • node_modules/angular2/router.min.js and
    • node_modules/angular2/http.min.js
    0 讨论(0)
  • 2021-01-17 19:24

    There are actually three versions of angular2.js along with three files for each dependency. There is the regular prod version of each (angular2.js), a minified prod version (angular2.min.js) and a development version (angular2.dev.js). Check out this link to see how the files can be bundled: Bundles, their content and usage scenarios

    0 讨论(0)
  • 2021-01-17 19:26

    angular2.dev.js uses global.Zone.longStackTraceZone = require('../zones/long-stack-trace.js') via zone.js for showing long stacktrace for angular exceptions to help with your development.

    Source: https://code.angularjs.org/2.0.0-alpha.28/angular2.dev.js

    Line 1984 to Line 2089

    0 讨论(0)
提交回复
热议问题