пытается использовать cropper.js:
cropper.js
https://github.com/fengyuanchen/cropperjs https://fengyuanchen.github.io/cropperjs/
После скачивания и распаковки файлов я создал index.php на корневом уровне:
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;
Что не так, пожалуйста?