Reloading changes to plugin resources

In Jira development, whenever a resource file like a .js or .css is changed, we are able to refresh the page in the browser and the changes will be loaded. Very convenient, and as expected.

But with Confluence, I’m noticing that any edits to .js or .css files made within the IDE are ignored, and that a full build & deploy cycle of the plugin must be performed for the changes to take effect within Confluence.

What am I missing? Or is this the state-of-the-art of Confluence Server/DC add-on development?

1 Like

Have you resolved your issue? I’m surprised no other developer is yelling about it:

  • We have a Server / Data Center plugin on Confluence,
  • Since Confluence ~7.15, the reload of JS files stopped working,
  • We have the correct directory in ${plugin.resource.directories},
  • We have the QuickReload plugin installed (but I think it is unrelated),
  • We flush the caches,
  • JS files still don’t load from the disk.

Not being able to hot-reload the Javascript files is a severe impediment to development work on Data Center.

No, still unresolved. The closest technical approach we have is iframes.

Indeed, thought this might be the premier forum to jump into an ongoing discussion of the matter, but so far… just crickets? The current edit / build & reload plugin / reload page dev cycle is killer slow, a truly monumental waste of time and precious life span.

I can’t offer much in the way of support myself from my position, but I did try this out right now using “atlas-create-confluence-plugin” without OSGI config. I am using default js/css file hosted at atl.general. I am able to do a “hard-refresh” of the page and receive changes to the js/css resources without recompiling the plugin.

I generally refer to this page when I have issues with QuickReload. https://developer.atlassian.com/server/framework/atlassian-sdk/automatic-plugin-reinstallation-with-quickreload/

I have only interacted casually with the plugin framework, so sorry if this isn’t super helpful.