After investing some hours finally found my solutions
Issue about promise((t,n) => ,
- At first, open the src/polyfills.ts file, and uncomment
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';
=> lambda expression does not support in IE so we can replace with code function() instead of this expression.
Install some packages
npm install --save web-animations-js
npm install --save classlist.js
Then i was found promise issue from one of the npm package (fuctbase64/index.js)
module.exports = function (event) {
return new Promise((resolve, reject) => {
let reader = new FileReader();
let files = event.target.files;
let len = files.length;
if (len > 1) {
reject(new DOMException("Only one file can be uploaded at a time"));
} else {
reader.onerror = () => {
reader.abort();
reject(new DOMException("Problem parsing input file."));
};
let file = files[0]
reader.onload = (evt) => {
const uint = new Uint8Array(evt.target.result);
let bytes = [];
uint.map(byte => {
bytes.push(byte.toString(16));
});
const hex = bytes.join('').toUpperCase();
let base64 = reader.result.split(',')[1];
file.base64 = base64;
file.binaryFileType = getMimetype(hex);
resolve(file);
};
reader.readAsDataURL(file);
}
});
}
Replace code with
module.exports = function (event) {
return new Promise(function(resolve, reject) {
let reader = new FileReader();
let files = event.target.files;
let len = files.length;
if (len > 1) {
reject(new DOMException("Only one file can be uploaded at a time"));
} else {
reader.onerror = function() {
reader.abort();
reject(new DOMException("Problem parsing input file."));
};
let file = files[0]
reader.onload = function(evt){
const uint = new Uint8Array(evt.target.result);
let bytes = [];
uint.map(function(byte) {
bytes.push(byte.toString(16));
});
const hex = bytes.join('').toUpperCase();
let base64 = reader.result.split(',')[1];
file.base64 = base64;
file.binaryFileType = getMimetype(hex);
resolve(file);
};
reader.readAsDataURL(file);
}
});
}