As was noted on the plugin page, this was on the roadmap, but not yet supported. I’ve added support now thanks to a prod from @wthit56 so you can treat it just like you would a normal ‘static’ import.

One nice use case that this properly/robustly unlocks is the situation where you e.g. have a plugin that you’ve made, and you want to import the comments plugin so people can chat about your plugin and ask questions, but you don’t want to cause all importers of your plugin to automatically get the comments plugin as a dependency.

If you just dynamically import the plugin in your HTML panel, then importers of your plugin won’t get the comments plugin as a dependency. Example:

https://perchance.org/import-only-in-html-panel-no-dependency-example#edit

(Reminder that, as mentioned on the dynamic import plugin page, you should only use the dynamic import plugin in very particular scenarios, like this one, or e.g. when you have hundreds of imports but only a subset of those imports tend to get used by any particular user of your generator. Regular imports will generally allow for much faster generator loading, since all the data is preloaded.)

  • BluePower
    link
    English
    324 days ago

    This is an amazing update, would be very useful to put into some of my projects (especially my advanced comments plugin demo)! Love to see some neat Perchance updates coming out whilst on my recovery time! (see this post)

    Also fun fact, this, along with the new favicon plugin, is one of the updates made in the Perchance Ad-Appreciation Day if you live in more-Western areas.