如何修复在角度5

时间:2018-08-10 18:00:28

标签: angular azure webpack ionic3 azure-mobile-services

所以我希望有人对如何解决这个问题有所了解。 在尝试尝试在其中实现Azure客户端库之前,我有一个Angular 5 / Ionic 3应用程序,该程序运行良好。

我已经安装了"azure-mobile-apps-client": "^2.0.1",并在类似这样的服务中引用了它:

import { Injectable } from '@angular/core';

declare var require:( moduleId:string ) => any;


@Injectable()
export class AzureService {

  private client: any;

  constructor() {

    let WindowsAzure = require('azure-mobile-apps-client');

    if( WindowsAzure && WindowsAzure.MobileServiceClient ) {
      this.client = new WindowsAzure.MobileServiceClient( 'someURL' );
    }
  };
};

这样做ionic serve和调试npm run ionic:build很好 但是当我从--prod版本运行应用程序时,我得到了一个神秘的错误

  

不受支持的表达式var _ $$ stmt $$ _ = function(e){返回   this.updatedAt> e}

我的猜测是minify / uglify部分会导致某些无效状态,仅在运行时才会引发异常。

我能探索解决这个问题的任何想法吗?这对于此应用至关重要。

0 个答案:

没有答案
相关问题