0

I have an Outlook Add-ins to automatically insert signature.

With desktop client, manifest.xml refers to only 1 javascript file, so I need to put everything in 1 single file.

However, I want to reuse some of the function it contains in the taskpane, which use another set of Javascript files.

Is there a way to create a common.js file that would be included everywhere?

Thanks

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
MaxP
  • 325
  • 5
  • 10

1 Answers1

0

You can create a JS file specifically for automatically inserting the signature, and then include that file in the HTML for the taskpane. Just ensure that this javascript file only contains ES6 code, and mainly API calls that you want to be shared between the signature insertion and the taskpane parts of your add-in. Also, include it in the taskpane HTML file, after the taskpane JS file.

Alternatively, it is OK to have 2 separate files here to avoid accidentally breaking one part of your add-in when you make future updates to it.