How to point to a file in XML manifest whereby the file's name is always changing?

Mark 0 Reputation points
2025-03-12T06:32:34.0166667+00:00

This is an excerpt of my manifest


          <Runtimes>
            <Runtime resid="WebViewRuntime.Url">
              <Override type="javascript" resid="JSRuntime.Url"/>
            </Runtime>
          </Runtimes>
...
      <Resources>
        <bt:Urls>
          <bt:Url id="JSRuntime.Url" DefaultValue="https://localhost:3000/commands.2938923827453.js"/>
          <bt:Url id="WebViewRuntime.Url" DefaultValue="https://localhost:3000/commands.html"/>
        </bt:Urls>
      </Resources>

In JSRuntime.URl, I used webpack to transpile and output a generated JS file with a hash appended at the end of the file of each build.

However, there is an issue whereby the hash will change after each build and I don't want to keep changing the manifest file. It is crucial to have this dynamic hashing to prevent browsers from caching it.

Is there any suggestion to allow the add-in to point to the correct file with a dynamic name?

Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,312 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.