bfintal / Counter-Up2

Counter-Up is a lightweight module that counts up to a targeted number when the number becomes visible.
MIT License
193 stars 65 forks source link

counterUp is not defined #6

Closed CydGoblin closed 4 years ago

CydGoblin commented 4 years ago

I'm importing with import counterUp from 'counterup2' but I keep getting counterUp is not defined. I'm using codekit, following the example. Anyone having similar issue?

const el = document.querySelector( '.counter__num' )

    // Start counting, do this on DOM ready or with Waypoints.
    counterUp( el, {
        duration: 1000,
        delay: 16,
    } )

Edit: I was misunderstanding how es6 modules work.