Skip to content

Feature Request: Add ES Module import #6

@bogdancondorachi

Description

@bogdancondorachi

Hi! 👋

It would be great if USAL could be imported as an ES module, for example in Vite projects.
Right now, importing it like this doesn’t work:

import usal from "usal";

usal();

It throws:

Uncaught SyntaxError: The requested module 'usal' does not provide an export named 'default'

It would be awesome to have proper ESM support, so it can be used with modern bundlers instead of only via CDN or framework-specific builds.

Additionally, a cleaner configuration API would be great — something like this would feel more natural:

import usal from "usal"

usal({
  once: true,
  defaults: {
    duration: 900,
    delay: 200,
    easing: "ease"
  }
})

Thanks for your work — it’s a great library! 🙌

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions