Skip to content
This repository was archived by the owner on Mar 25, 2026. It is now read-only.
This repository was archived by the owner on Mar 25, 2026. It is now read-only.

Support ES6 loading #139

Description

@jurchiks

Currently it is impossible to load this plugin when building sources using, e.g. gulp, because import 'modaal' fails with Uncaught ReferenceError: jQuery is undefined, even if you have code like this:

import $ from 'jquery'; <-- This does not define window.jQuery when building code in Node.
import 'modaal'; <-- This subsequently does not have access to a global jQuery object.

I've found a pretty nice workaround for this, but it requires changes in your source code, there's nothing I can do in my code to make it work: https://gist.github.com/monkeymonk/c08cb040431f89f99928132ca221d647
This can obviously be merged into a single JS file, the gist is simply a flexible solution.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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