appleple / SmartPhoto

The most easy to use responsive image viewer especially for mobile devices
https://appleple.github.io/SmartPhoto/
MIT License
906 stars 62 forks source link

How to import in ES6? #79

Open Kcko opened 2 years ago

Kcko commented 2 years ago

Something like this

import {SmartPhoto from './vendor/lightbox/smartphoto.js'; but its not works ...

uidev1116 commented 1 year ago

@Kcko

import SmartPhoto from 'smartphoto';

This is how to import in ES6.

Kcko commented 1 year ago

@uidev1116 of course i know how import in ES6, i know ES6 from floor to ceil, but it didn't work, but that doesn't matter now (it took a little longer from create this topic ;-)

uidev1116 commented 1 year ago

@Kcko

Sorry for the late reply.

Do you use bundling tools such as webpack? In order to import this library with the ES module, a bundling tool is required.