wildhaber / gluebert

gluebert.js is a tiny helper lazy loading DOM Elements, StyleSheets and JavaScript files using dynamic import and code splitting

Home Page:https://gluebert.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve dependency management

wildhaber opened this issue · comments

Description

Currently it's a manual process within the controller to load further dependencies manually like:

    async _loadDependencies() {
        this._anime = await import('animejs');
    }

Example:
https://github.com/wildhaber/gluebert/blob/develop/documentation/themes/gluebert/src/js/modules/process-illustration/process-illustration.controller.js#L28-L30

It would be good to be able to define dependencies in the module signature and have them available in the controllers later.