Plugin route-map loaded even when it’s disabled

I noticed that a plugin’s client-side routes are loaded even if the plugin is disabled. Is this to be expected?

One still has access to the site settings via this.site.siteSettings and can load routes dynamically like this:

export default function () {
  if (this.site.siteSettings['my_plugin_enabled']) {
    this.route('test');
  }
}

I wonder if plugin routes should be loaded if a plugin is disabled. Shouldn’t they be unavailable?

We will get there… once we merge this PR by @vinothkannans

https://github.com/discourse/discourse/pull/7279

7 Likes