An unhandled exception occurred: Unexpected token: punc ()) when try to build for production in Angular with the command
ng build --prod --aot=true --commonChunk=true --optimization=true --vendorChunk=true --base-href=./

How to reproduce
1 - create a new angular app
2 - install the package npm install steem --save
3 - in app.component.ts
import { Component } from '@angular/core';
import * as steem from 'steem';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'steembug';
constructor(){
steem.api.getAccounts(['ned', 'dan'], function(err, result) {
console.log(err, result);
});
}
}
4 - to solve the error of Global in polyfills.ts add
(window as any).global = window;
5 - to solve the error of Buffer edit 'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js' and modify node: false by
node: {crypto: true, stream: true}
Environment:

An unhandled exception occurred: Unexpected token: punc ()) when try to build for production in Angular with the command
How to reproduce
1 - create a new angular app
2 - install the package
npm install steem --save3 - in
app.component.ts4 - to solve the error of Global in
polyfills.tsadd5 - to solve the error of Buffer edit
'node_modules/@angular-devkit/build-angular/src/angular-cli-files/models/webpack-configs/browser.js'and modifynode: falsebyEnvironment: