Below points explain my understanding and questions of ES6 modules with regards to Angular2 web application development.
As per my understanding , modules (export/import) have been introduced in ES6 , and that the current browsers support export / import syntax , but they do not support module loading.
Because the current Browsers do not support module loading , either we have use module loaders like systemJS which will take care of loading the modules by making some kind of AJAX calls , or we have to use module bundlers like webpack which will bundle all the modules in to a single JS file.
Please let me know whether points 1 and 2 are correct or not.
- I observed that most of the time "target" property in tsconfig.json is to "es5" , should this be always be set to "es5" with regards to Angular 2 web applications OR can it be modified based on whether we are using systemJS or webpack