netanelgilad / meteor-angular2-typescript

6 stars 7 forks source link

Allow pre-load compiled Typescript modules (ES6/systemjs) #1

Closed dalcib closed 9 years ago

dalcib commented 9 years ago

Until now, the Modules were loaded dynamically by SystemJS. In dev mode it is ok, but in production, the Modules are not minified and bundled like the rest of Meteor's app. With the use of named Modules for System.register, Meteor load the Modules (.js files) normally, and they are used by SystemJS. To more information look: System.register Explained

The last version of Typescript 1.5.3-betha is needed.

netanelgilad commented 9 years ago

Great stuff @dalcib. I wanted to do use system.js too and this seems like a good solution. Did this work for you with an angular2 app too?

dalcib commented 9 years ago

Yes, it works fine. I didn't change any code in meteor-angular2.0-socially.

Look that Parties-list.js is loaded for Script tag by Meteor, not by SystemJS for XHR.

systemjs-meteor1

systemjs-meteor2

systemjs-meteor3