Skip to content
This repository has been archived by the owner on Apr 25, 2019. It is now read-only.

plugin-loader rerun on reload #16

Open
aaronjudd opened this issue Oct 14, 2016 · 1 comment
Open

plugin-loader rerun on reload #16

aaronjudd opened this issue Oct 14, 2016 · 1 comment

Comments

@aaronjudd
Copy link

aaronjudd commented Oct 14, 2016

As a developer, I wish that when the application reload or startup processes exit with Unable to resolve some modules:, the plugin-loader would rerun.

You can replicate this behaviour by switching branches where a new plugin has been added, while you have a running application. ie, switch from development to ek-email-templates (as of 0.17.0).

Example error:

=> Server modified -- restarting...
Unable to resolve some modules:

  "/imports/plugins/included/email-templates/server" in
/Users/aaronjudd/ongoworks/reaction/server/plugins.js (os.osx.x86_64)
  "/imports/plugins/included/email-templates/register.js" in
/Users/aaronjudd/ongoworks/reaction/server/plugins.js (os.osx.x86_64)

@jshimko
Copy link
Contributor

jshimko commented Oct 15, 2016

Yeah... I wish that was possible too. The only reason that's not the default behavior is because it would require having the plugin loader built into the Meteor build tool (which was not an easy endeavor at all). I originally got around that by having the plugin loader run in a Meteor.startup callback within Reaction, but that came with its own set of issues (like the app reloading after the new files were generated).

So, I'm not sure what the best answer is here. The current state requires you to restart the app after adding/removing an entire plugin directory, but that also allows the plugin loader to be completely separate from the Meteor build tool (definitely ideal). We can build a Meteor build tool plugin, but that's going to require some significant engineering effort. Stopping and restarting the app was/is the reasonable compromise to that excessive effort.

So in short... it can happen, but it's going to be a bit of a project.

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

No branches or pull requests

2 participants