systemjs

Angular2 too many file requests on load

。_饼干妹妹 提交于 2019-11-26 06:18:28
问题 I\'m making a website using Angular2 and I\'m having what i suppose is an issue. On the first load of my angular page, SystemJS is making more than 500 hundred requests to retrieve every Angular2 file in angular2/src directory. In total, the first load downloads more than 4MB and it takes more than 14 seconds to start. My index.html does the following scripts includes: <script src=\"libs/angular2/bundles/angular2-polyfills.js\"></script> <script src=\"libs/systemjs/dist/system.src.js\"><

How to prepare release version with SystemJS and Gulp?

ε祈祈猫儿з 提交于 2019-11-26 04:08:27
问题 I use SystemJS in my Angular2 project. I use tsconfig file for TypeScript. I want to use gulp to concat and minify my code for production version. I am having an issues with concating the code: each time I try to concat files I get either \'angular\' not defined or \'system\' not defined. I tried to modify the order that I try to load my files from node modules, however I did not succeeded. I was wondering if any of you had this issues, and found an answer to it? Here is my gulp file: var

How to bundle an Angular app for production

早过忘川 提交于 2019-11-26 01:36:37
问题 What is the best method to bundle Angular (version 2, 4, 6, ...) for production on a live web server. Please include the Angular version within answers so we can track better when it moves to later releases. 回答1: 2.x, 4.x, 5.x, 6.x, 7.x, 8.x (TypeScript) with Angular CLI OneTime Setup npm install -g @angular/cli ng new projectFolder creates a new application Bundling Step ng build --prod (run in command line when directory is projectFolder ) flag prod bundle for production (see the Angular

How do I actually deploy an Angular 2 + Typescript + systemjs app?

て烟熏妆下的殇ゞ 提交于 2019-11-26 01:05:36
问题 There\'s a quickstarter tutorial over at angular.io which uses typescript & systemjs. Now that I\'ve got that miniapp running, how would I go about creating something deployable? I couldn\'t find any info about it whatsoever. Do I need any extra tools, any additional settings in System.config? (I know that I could use webpack & create a single bundle.js, but I\'d like to use systemjs as it is used in the tutorial) Could someone share their build process with this setup (Angular 2, TypeScript,

How do I actually deploy an Angular 2 + Typescript + systemjs app?

可紊 提交于 2019-11-25 23:58:57
There's a quickstarter tutorial over at angular.io which uses typescript & systemjs. Now that I've got that miniapp running, how would I go about creating something deployable? I couldn't find any info about it whatsoever. Do I need any extra tools, any additional settings in System.config? (I know that I could use webpack & create a single bundle.js, but I'd like to use systemjs as it is used in the tutorial) Could someone share their build process with this setup (Angular 2, TypeScript, systemjs) The key thing to understand at this level is that using the following configuration, you can't