Я пытаюсь понять, почему скрипт выдает мне ошибки в IE 11. Я урезал его до:
/*
* enter-view.js is library
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(factory);
} else if (typeof module !== 'undefined' && module.exports) {
module.exports = factory();
} else {
window.enterView = factory.call(this);
}
})(function () {
const lib = function ({
selector,
enter = function () {},
exit = function () {},
progress = function () {},
offset = 0,
once = false
}) {
// other code here - but trimmed down
};
return lib;
});
Код ошибки говорит: строка 14, столбец 25 - чтоэто:
const lib = function ({
Я не могу понять, почему это дает мне эту ошибку, хотя. Любые предложения?
Кстати, полученный код от Babel, с этой конфигурацией:
{
"plugins": [
"babel-plugin-transform-es2015-template-literals",
"babel-plugin-transform-es2015-arrow-functions",
"babel-polyfill"
]
}