Подключение библиотеки motus js
При подключении библиотеки через npm в консоли выдает ошибку
Uncaught TypeError: motus__WEBPACK_IMPORTED_MODULE_2__.Animation is not a constructor
at ./src/js/files/script.js (script.js:8:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
at ./src/js/app.js (log.js:59:1)
at __webpack_require__ (bootstrap:24:1)
at startup:6:1
at startup:6:1
HTML:
<!DOCTYPE html>
<html lang="ru">
<head>
<title>Главная</title>
<meta charset="UTF-8">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="wrapper">
<div id="block">Lorem ipsum dolor sit amet.</div>
</div>
<script src="js/app.min.js?_v=20230114160919"></script>
</body>
</html>
JS:
import Motus from "motus";
const animation = new Motus.Animation({
$el: document.getElementById("block"),
keyframes: [
{
fontSize: 50,
color: "red",
},
],
});
Motus.addAnimation(animation);
Библиотека была успешно установлена через npm, командой - npm i -S motus
Ссылка на документацию по подключении библиотеки - https://alexcambose.ro/motus/#/quick-start?id=creating-an-animation