Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@require keyword not supported #74

Open
McBen opened this issue Apr 26, 2022 · 3 comments
Open

@require keyword not supported #74

McBen opened this issue Apr 26, 2022 · 3 comments

Comments

@McBen
Copy link
Contributor

McBen commented Apr 26, 2022

(just copy & pasted the issue from iitc-TG)

@ryantheleach
Copy link

This hit me hard today.

Any suggested workarounds to @require?

@modos189
Copy link
Contributor

modos189 commented Feb 2, 2025

@ryantheleach Can you send such a plugin that requires @require to work? If this plugin is public

@ryantheleach
Copy link

My workaround was editing the plugin.

@require https://unpkg.com/[email protected]/dist/esri-leaflet.js
@require https://unpkg.com/[email protected]/dist/esri-leaflet-vector.js

became

    window.plugin.mine.require = function(url) {
      var scriptTag = document.createElement('script');
      scriptTag.src = url;
      document.head.appendChild(scriptTag);
    };

    window.plugin.mine.require('https://unpkg.com/[email protected]/dist/esri-leaflet.js');
    window.plugin.mine.require('https://unpkg.com/[email protected]/dist/esri-leaflet-vector.js');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants