cropper.js - неожиданный идентификатор - PullRequest
0 голосов
/ 20 апреля 2019

пытается использовать cropper.js:

https://github.com/fengyuanchen/cropperjs
https://fengyuanchen.github.io/cropperjs/

После скачивания и распаковки файлов я создал index.php на корневом уровне:

<!doctype html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<title>IMGED</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<link href="src/index.css" rel="stylesheet">
</head>

<body>
<div>
  <img id="image" src="img.jpg" alt='img'>
</div>
<script src="src/index.js"></script>

</body>
</html>

Консоль

Uncaught SyntaxError: Unexpected identifier... index.js:1  

index.js

import Cropper from './js/cropper';
export default Cropper;

Что не так, пожалуйста?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...