Я пытаюсь использовать Rollup для объединения и встряхивания моего существующего проекта. Однако я получаю следующую ошибку.
Экспорт «Клиент» не определен «C:\Users\George\Source\Repos\docs\client\service\search.service.js». Ошибка преобразования пакета с плагином «uglify»: SyntaxError: Неожиданный токен: имя (UiService)
вот мой search.service.ts:
import { Injectable } from '@angular/core';
import * as elasticsearch from 'elasticsearch';
//declare var elasticsearch: any;
@Injectable()
export class SearchService {
private Client: elasticsearch.Client;
constructor() {
var connectionString = 'https://paas:[email protected]';
this.Client = new elasticsearch.Client({
host: connectionString,
log: 'trace'
});
}
search(term: string): any {
return this.Client.search({
index: 'plugins',
type: 'ds044699_mlab_com_cdc1',
body: {
query: {
multi_match: {
query: term,
fields: ['name', 'description']
}
}
}
});
}
}
а вот мой ui.service.ts:
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs/Subject';
@Injectable()
export class UiService {
chapters: string;
// Observable boolean streams
navState$ = this.navStateSource.asObservable();
chapter = this._chapter.asObservable();
// Observable boolean sources
private navStateSource = new Subject<boolean>();
private _chapter: Subject<number> = new Subject<number>();
// Service message commands
changeNavState(showNav: boolean) {
this.navStateSource.next(showNav);
}
changeChapter(chapter: number) {
this._chapter.next(chapter);
}
}
Я не вижу, что не так с любым из этих файлов? - Где я должен искать?