Angular2 => Angular 5.2 в visual studio 2015 очень медленно запускается после обновления - PullRequest
0 голосов
/ 13 декабря 2018

Я обновил свой проект angular 2 с angular2 => Angular 5.2 Я использую Visual Studio 2015 и проект asp.net.После запуска обновления F5 работает очень медленно, 90 секунд менее чем за 30 секунд до обновления.

У кого-то есть такая же проблема?

Я удалил много зависимостей, чтобы уменьшить шум.

поэтому package.json выглядит так:

    {
  "name": "",
  "version": "2.0.0",
  "author": "",
  "description": "",
  "dependencies": {
    "@angular/animations": "5.2.0",
    "@angular/common": "5.2.0",
    "@angular/compiler": "5.2.0",
    "@angular/core": "5.2.0",
    "@angular/forms": "5.2.0",
    "@angular/http": "5.2.0",
    "@angular/platform-browser": "5.2.0",
    "@angular/platform-browser-dynamic": "5.2.0",
    "@angular/router": "5.2.0",
    "@types/node": "^10.12.12",
    "bootstrap": "3.3.7",
    "core-js": "2.4.1",
    "ngx-toastr": "6.5.0",
    "reflect-metadata": "0.1.12",
    "rxjs": "5.5.2",
    "systemjs": "0.19.47",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "typescript": "2.6.2"
  }
}

main.ts вот так

    // main entry point
//import { enableProdMode } from '@angular/core'; 
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module'; 

//enableProdMode();

platformBrowserDynamic().bootstrapModule(AppModule);

Systemjs.config вот так

/**
 * System configuration for Angular 2 samples
 * Adjust as necessary for your application needs.
 */
(function (global) {
    System.config({
        paths: {
            // paths serve as alias
            'npm:': 'node_modules/'
        },
        // map tells the System loader where to look for things
        map: {
            // our app is within the app folder
            app: 'app',

            // angular bundles
            '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.min.js',
            '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.min.js',
            '@angular/core': 'npm:@angular/core/bundles/core.umd.min.js',
            '@angular/common': 'npm:@angular/common/bundles/common.umd.min.js',
            '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.min.js',
            '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.min.js',
            '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.min.js',
            '@angular/http': 'npm:@angular/http/bundles/http.umd.min.js',
            '@angular/router': 'npm:@angular/router/bundles/router.umd.min.js',
            '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.min.js',

            '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.min.js',


            // other libraries
            'rxjs': 'npm:rxjs',
            'ngx-toastr': 'node_modules/ngx-toastr/toastr.umd.js'
        },
        // packages tells the System loader how to load when no filename and/or no extension
        packages: {
            app: {
                main: './main.js',
                defaultExtension: 'js'
            },
            rxjs: {
                defaultExtension: 'js'
            }
        }
    });
})(this);

tsconfig.json

{
  "compileOnSave": true,

  "compilerOptions": {
    "target": "es5",
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "skipDefaultLibCheck": true,
    "removeComments": false,
    "noImplicitAny": true,
    "suppressImplicitAnyIndexErrors": true,
    "typeRoots": [
      "../node_modules/@types"
    ],
    "lib": [ "es5", "es6", "dom" ]
    //"outFile": "dist/app.js"
  },
   "exclude": ["node_modules/@angular/platform-server/src/transfer_state.d.ts", "bin", "node_modules" ]
}

Спасибо за помощь

F

1 Ответ

0 голосов
/ 13 декабря 2018

Я обновляю свой ide до vs 2017, и все становится как прежде.Благодарю.Я закрываю тему

...