reactioncommerce / reaction-cli

A command line tool for working with Reaction Commerce.
33 stars 20 forks source link

reaction run imports disabled plugins #55

Closed joelquatro closed 6 years ago

joelquatro commented 6 years ago

steps to reproduce:

  1. disable a plugin from its register.js and/or reaction.json
  2. run reaction: "reaction run"
  3. check generated server/plugins.js and client/plugins.js and you will see the import active for the "disabled" plugin.
jshimko commented 6 years ago

That is currently the expected behavior. Changing to enabled: false has no effect on whether the CLI imports those files. That only controls whether it's enabled in the UI.

jshimko commented 6 years ago

There are plans to allow enabling/disabling of plugins with the CLI in the near future as part of our upcoming performance improvements, but that state will be managed with the CLI's configs, not in plugin code. Once that feature exists, you will see docs for it in the CLI itself and in the readme here.

joelquatro commented 6 years ago

Got It, but this loads unnecessary files in the client, such as templates definition, assets, classes, etc. Slowing the frontend for plugins not enabled.

brent-hoover commented 6 years ago

@joelquatro For now, you can emulate really disabling the plugin by simply renaming the plugin starting with a period. They will be ignored by the CLI and by Meteor. It's a hack, but should allow you to workaround it for now, and soon the CLI will allow you to manage this through configuration.